Hey there. I was wondering if someone could help me here with a php sql part i cant understand how to make. i run a pointbased page where users get's points for diffrent things, and they are reseted every day, now i wonder how can i make it so that each night when the reset happens, it counts who have the most points for the row "totaltoday" and updates the row "vip" to +1 ? if it's 0 it should be 1, if it's 1 it should be 2 etc. hope someone can help me thanks in advance.
UPDATE `table` SET `vip` = `vip`+1 WHERE `totaltoday` = (SELECT MAX(`totaltoday`) FROM `table`) That was off the top of my head so it could be incorrect.