I want to delete entries in a mysql table for which timestamp is older than 1 Hour. The mysql syntax is:
DELETE from table WHERE t < DATE_SUB(NOW(), INTERVAL 1 HOUR);
This works fine but I can't get it running through a perl DBI command. The following for instance does not work:
$dbh->do("DELETE from table WHERE t < DATE_SUB(NOW(), INTERVAL 1 HOUR)"
;
Any idea ?
DELETE from table WHERE t < DATE_SUB(NOW(), INTERVAL 1 HOUR);
This works fine but I can't get it running through a perl DBI command. The following for instance does not work:
$dbh->do("DELETE from table WHERE t < DATE_SUB(NOW(), INTERVAL 1 HOUR)"
Any idea ?