Karl-Arne Gjersøyen
2013-08-02 10:58:41 UTC
Hello again, folks!
I wish to delete records in my database that is older than 3 months.
$todays_date = date('Y-m-d');
$old_records_to_delete = ???
if($old_records_to_delete){
include(connect.php);
$sql = "DELETE FROM table WHERE date >= '$old_records_to_delete'";
mysql_query($sql, $connect_db) or die(mysql_error());
}
Thank you very much for your help to understand also this question :)
Karl
I wish to delete records in my database that is older than 3 months.
$todays_date = date('Y-m-d');
$old_records_to_delete = ???
if($old_records_to_delete){
include(connect.php);
$sql = "DELETE FROM table WHERE date >= '$old_records_to_delete'";
mysql_query($sql, $connect_db) or die(mysql_error());
}
Thank you very much for your help to understand also this question :)
Karl