Check the MySQL manual DATE/TIME functions.

try:  DELETE FROM mytable WHERE date_column < ( CURRDATE()-30 )

-----Original Message-----
From: Koutsogiannopoulos Karolos [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, October 03, 2001 7:41 AM
To: 'Php-Db (E-mail)
Subject: [PHP-DB] mysql - php DATE QUESTION...

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?


PHP Database Mailing List (
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