i have a quick question regarding my wallpaper dedicated server. i run a wallpaper website and i want to be able to reset my stats every 24hrs and every month to keep track of my users.

lets say for example that i have a mysql database table and in the sql query, i want to be able to find out if it has been more than twenty four hours (one day), if it has, i want the number of visits to reset to 1

how can i do that?