mrgrim333 Posted November 26, 2009 Share Posted November 26, 2009 So I have a list of shows for a band, and they don't really keep tabs on their website show listing. I don't have time either. Is there any way to delete a post after the date has passed? (ex. 12/01/09 is deleted 12/02/09) The script should run on the page that displays the shows, so if anyone looks at it, the shows will self manage, no need for timed scripts. Link to comment https://forums.phpfreaks.com/topic/183000-delete-expired-mysql-entry/ Share on other sites More sharing options...
Mchl Posted November 26, 2009 Share Posted November 26, 2009 This will delete records with dateField field older than one month. DELETE FROM table WHERE dateField < CURDATE() - INTERVAL 1 MONTH Link to comment https://forums.phpfreaks.com/topic/183000-delete-expired-mysql-entry/#findComment-965875 Share on other sites More sharing options...
mrgrim333 Posted November 26, 2009 Author Share Posted November 26, 2009 Works great! Thank you! Link to comment https://forums.phpfreaks.com/topic/183000-delete-expired-mysql-entry/#findComment-965882 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.