Delete record if older than 5 minutes?
Posted: Sun Apr 08, 2007 7:10 pm
Can someone help me with deleting a record, when that record is older than 5 minutes?
Someone gave me this query:
$query = "DELETE FROM liveacars WHERE last_update < NOW() - INTERVAL 300 SECOND";
But when I execute it, it does not delete the records.
FYI, the last_update field is set as timestamp and the value inside it is written like this for example: 2007-04-08 19:20:00
Thanks for any help, as I am going nuts trying to get this to work.
ERuiz
Someone gave me this query:
$query = "DELETE FROM liveacars WHERE last_update < NOW() - INTERVAL 300 SECOND";
But when I execute it, it does not delete the records.
FYI, the last_update field is set as timestamp and the value inside it is written like this for example: 2007-04-08 19:20:00
Thanks for any help, as I am going nuts trying to get this to work.
ERuiz