How can I automatically delete rows from the MySQL database on a specific date?


I know there has to be a way to automatically delete a row in a MySQL table on a specified date. I am just brain dead today : /

Let's just say I have CMS that I input posts and want one of the fields in the table to be "delete_date" and if I put a date in that field it would delete that row on the date specified. If I do not enter a date it would not auto delete.

What would be the best way to do this using PHP/MySQL. Tips or examples would help.

A basic query:

DELETE * FROM cms_table WHERE delete_date='$the_date_to_delete'

( see: )