MySQL: How to delete X day old entries
March 10, 2011 | In: mysql, web development
In some cases we need to remove old entries from the database or remove entries before specific days. So mysql provides the syntax to delete records: DELETE FROM $table_name WHERE $date_field < date_sub(CURDATE(), $numberOfDays day) If above...