[email protected] Posted November 9, 2009 Share Posted November 9, 2009 .. $query = mysql_query("DELETE FROM *table* WHERE datetime > 3 days back")or die(mysql_error()); My error? Link to comment https://forums.phpfreaks.com/topic/180881-solved-delete-rows-belonging-to-datetime/ Share on other sites More sharing options...
[email protected] Posted November 9, 2009 Author Share Posted November 9, 2009 Any HELP $query_users = mysql_query("DELETE FROM *table* WHERE date_time < SYSDATE - 3 ")or die(mysql_error()); //I am trying to delete all data 3 days old Link to comment https://forums.phpfreaks.com/topic/180881-solved-delete-rows-belonging-to-datetime/#findComment-954320 Share on other sites More sharing options...
Maq Posted November 9, 2009 Share Posted November 9, 2009 What's the error? 1) Not sure what *table* is. 2) Which query are you using? Link to comment https://forums.phpfreaks.com/topic/180881-solved-delete-rows-belonging-to-datetime/#findComment-954322 Share on other sites More sharing options...
[email protected] Posted November 9, 2009 Author Share Posted November 9, 2009 Fixed it!! thanks though Maq $query_users = mysql_query("DELETE FROM test1 WHERE date_time < (curdate() - 2)")or die(mysql_error()); Link to comment https://forums.phpfreaks.com/topic/180881-solved-delete-rows-belonging-to-datetime/#findComment-954329 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.