I have a timestamp field in my table. How do I delete records older than 10 minutes old?
Tried this:
DELETE FROM locks WHERE time_created < DATE_SUB(
The answer is right in the MYSQL manual itself.
"DELETE FROM `table_name` WHERE `time_col` < ADDDATE(NOW(), INTERVAL -1 HOUR)"