Quote:
Originally Posted by Bugsy
What I want to know is why you are reading all of the records in the table and then deleting 1 by one. See if this works:
PHP Code:
SQL_QueryAndIgnore(sql, "DELETE FROM `%s` WHERE (Startdate + (Days * 86400)) <= %d", table, CurrDate )
|
Inexperience is the answer to that question. This works ALMOST flawlessly.
What is the syntax if I wanted to check that days is not equal to 0?
I'm using 0 as permanent rather than a whole lotta 9s.
Edit: that was a simple google
PHP Code:
SQL_QueryAndIgnore(sql, "DELETE FROM `%s` WHERE (Startdate + (Days * 2)) <= %d AND Days != 0", table, CurrDate )
Thanks for the help