level09 on 02/24/10
Last Edited at 02/24/10 06:10am
while (1) { mysql_query("DELETE FROM logs WHERE log_date <= '2009-10-01' LIMIT 10000"); if (mysql_affected_rows() == 0) { // done deleting break; } // you can even pause a bit usleep(50000);}
Report this snippet Tweet
Comment:
You need to login to post a comment.