Re: Deleting older records

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> Okay I have a timestamp field how do I create a query to delete all
entries
> older than an hour.  Timestamp field is set by now() function.

DELETE FROM tblDownloadTrack WHERE `timestamp` <
TIME_TO_SEC(DATE_SUB(NOW( ), INTERVAL 1 HOUR))

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux