On Tue, 13 Apr 2004, Tom Collins wrote:

> On Apr 13, 2004, at 4:22 PM, Michael Bowe wrote:
> > Yes, your best bet would be periodically issue an SQL command such as
> > "DELETE FROM vlog WHERE timestamp < whateverdate"
>
> This should work as well:
>
> DELETE FROM vlog WHERE timestamp < DATE_SUB(CURRENT_DATE, INTERVAL 7
> DAY)

On 5.3.x, timestamp is in unix timestamp format, so you'll need something
like "DELETE FROM vlog WHERE timestamp <
unixtime_where_you_want_to_delete_from".

Is using a MySQL DATETIME type new in 5.4.x?

Thanks,

C

> --
> Tom Collins  -  [EMAIL PROTECTED]
> QmailAdmin: http://qmailadmin.sf.net/  Vpopmail: http://vpopmail.sf.net/
> Info on the Sniffter hand-held Network Tester: http://sniffter.com/
>
>

Reply via email to