which format are you using for date into db? its unix timestamp like a number 123454 or just 12.12.2012? do this php script <?php //for int timestamp $yesterday = strtotime("- 1 day"); $sql = mysql_query("delete from tableName where Date = '$yesterday'"); //or for simple date $yesterday = strtotime("- 1 day"); $yesterday = date("d.m.Y"); $sql = mysql_query("delete from tableName where Date = '$yesterday'"); ?>
Just use the queries in the code crivion gave and then replace $yesterday with something like Interval Assuming a Date column this should help you on your way, since this is the Database forum and I don't do ASP I can't help you to code it. DELETE FROM tableName WHERE Date = now()- INTERVAL'1 Day';
thnx chisara...I got what youare trying to say here..but I still don't know how to set the interval. How would you do in MS Access databse using SQL queries?
The idea is to have the current date minus the interval of one day, I am not that familiar with the MS-Access implementation, so I can only give you the specific direction but I can't help you with an answer. P.S. My Answer was an SQL query for Postgresql, MS-Access uses nearly the same SQL language.