Re: [SPAM] [PHP-DB] Deleting older record
| From: | Justin Patrin | Date: | Fri, 13 Aug 2004 15:56:21 +0000 |
| Subject: | Re: [SPAM] [PHP-DB] Deleting older record | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-35695@lists.php.net to get a copy of this message | ||
On Fri, 13 Aug 2004 00:08:56 -0500, Dylan Barber
<dylan.barber@earthlink.net> wrote:
> I have a tracking database but I only need things in it for about an hour
>
> I tried this
>
> DELETE * FROM
tblDownloadTrack WHERE
> timestamp < TIME_TO_SEC( NOW( ) )
>
> but it gives me an error anybody help me out on this?
>
> MySQL 4.0.16
>
You need to give us an error.
Perhaps:
DELETE * FROM tblDownloadTrack WHERE timestamp < DATE_SUB(NOW( ),
INTERVAL 1 HOUR)
--
DB_DataObject_FormBuilder - The database at your fingertips
http://pear.php.net/package/DB_DataObject_FormBuilder
paperCrane --Justin Patrin--