First of all - READ THE FULL MYSQL MANUAL! It is all there.
now, if you have a timestamp column (or a datetime column) you could
do:
DELETE FROM sometable WHERE timestampcolumn>SUBDATE(NOW(), INTERVAL 2 DAY);
this is just an example, you might want to use FROM_UNIXTIME, UNIX_TIMESTAMP
or
something like that.
RTFM.
----- Original Message -----
From: "LDL Enterprise" <webmaster@stripped>
To: "*MySQL mail list" <mysql@stripped>
Sent: Tuesday, October 03, 2000 1:02 PM
Subject: Delete old records
Hi,
I am hoping someone can tell me how I can remove records in a MySQL
database (using PHP) that are more than 2 days old. I have a field that
enters the time the record was recorded but I cannot figure out a query to
check for old entries and delete them.
Thanks.
Larry L.
larry@stripped