DELETE FROM tablename
WHERE DATE_SUB(tablename.datefield, INTERVAL 30 DAY) > NOW()

"Koutsogiannopoulos Karolos" <[EMAIL PROTECTED]> wrote in
message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Can someone offer some help...?
>
> Lets say i have a date collumn in a mysql table that includes dates that
get
> stored each time i enter an entry...
>
> How can i check when i enter the page that displays the entries to delete
> all entries older than 30 days?
>
> thanks.
>



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to