Forum Moderators: coopster
CREATE EVENT delete_old_mess ON SCHEDULE EVERY1 HOUR DO DELETE FROM 'messages' WHERE 'date' < NOW( ) - INTERVAL 2 DAY
If you are using php then what event are you using to triger this clean up? Is it something that happens every time someone accesses the db, or do you have a script that is always running in the background and just has a time delay built into the code?