How to update all selected rows?
Posted: Tue Feb 14, 2012 4:29 am
Hello,
I have a script which is run every 5 minutes, it gets about 100 queries. Sometimes it needs more than 5 minutes so the other scripts start too and it gets some of the queries that were selected in the first cronjob. At every execute of the query I mark it as done but because sometimes script can not be finished in 5 minutes it will not have time to mark all as executed so the next cron job will get those queries as well. Is there anyway at the begin of SELECT to mark all selected as finished?
I have a script which is run every 5 minutes, it gets about 100 queries. Sometimes it needs more than 5 minutes so the other scripts start too and it gets some of the queries that were selected in the first cronjob. At every execute of the query I mark it as done but because sometimes script can not be finished in 5 minutes it will not have time to mark all as executed so the next cron job will get those queries as well. Is there anyway at the begin of SELECT to mark all selected as finished?