Is there a query/script that will auto reset/reverse the tables to a time earlier at a certain time?
There are database backups that you may be able to restore...
Free unique IP and $67 off with code [color=#CC0000]LMIP67[/color] or use [color=#CC0000]LM97[/color] for $97 off. Click for more promo code discounts
Yes but I will not be able to manually restore ALL OF THE DATABASE one by one.
So are you saying that you have tens or hundreds of different mysql databases and that you want to revert all of them?
Yes it's like how a demo site does. At a certain time(every 2hours etc.) All of the demo scripts/sites will revert back to the time where it is just installed.
Can't you just do that with a script run with a cron job? Just "export" the data base when it is in the condition you want it to revert to, then run a query that drops all the tables and reloads them from the export SQL file.