Forum Moderators: open
What I am trying to do is delete all the old entries in a database table. I only want 10 entries that have the ParentID of 5.
To show the rows that I want to delete, I use the following SELECT statement:
SELECT * FROM `table` WHERE `ParentID`=5 ORDER BY `id` DESC, `date` DESC
LIMIT 11 , 99999
Can someone show me how I can change this SELECT statement to a DELETE statement, so that it deletes the rows instead?
[url=http://dev.mysql.com/doc/refman/5.0/en/delete.html]DELETE[/url] FROM `table` WHERE `ParentID`=5 LIMIT 11 , 99999
Best of luck!
oops :)