Re: Deleting older records

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

 



This works just fine thanks

-----Original Message-----
From: Nadim Attari <nadim@xxxxxxxxxxxxxxxx>
Sent: Aug 13, 2004 1:12 AM
To: php-db@xxxxxxxxxxxxx
Subject: Re:  Deleting older records

> 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



DDDDD     JJJJJJJJ BBBBB
DDD DD    JJJJJJJJ BBB BB
DDD  DD      JJJ   BBB  BB
DDD   DD     JJJ   BBB BB 
DDD    DD    JJJ   BBBBB
DDD   DD  JJ JJJ   BBB BB
DDD  DD   JJ JJJ   BBB  BB
DDD DD  ..JJJJJJ ..BBB BB
DDDDD   .. JJJJ  ..BBBBB

-----------------------------------
Dylan Barber
(CIW Professional, A+ Technician)
Web Designer / Developer / DotNetNuke Portal Creator
-----------------------------------
Clip those URLs! - 
Short links are easier to remember.
http://clipurl.com

-- 
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