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
DELETE FROM sometable WHERE timestampcolumn>SUBDATE(NOW(), INTERVAL 2 DAY);
this is just an example, you might want to use FROM_UNIXTIME, UNIX_TIMESTAMP
something like that.
----- 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
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.