3dhomejoe Posted March 13, 2010 Share Posted March 13, 2010 Hello, Im trying to select data that is older then 30 days in my data base, this code that I have selects the past 30 days not the data that is older then 30 days, SELECT starttime FROM attacktype_table WHERE DATE_SUB(CURDATE(),INTERVAL 30 DAY); Thanks Joe Link to comment https://forums.phpfreaks.com/topic/195087-select-data-that-is-older-then-30-days/ Share on other sites More sharing options...
xander85 Posted March 15, 2010 Share Posted March 15, 2010 Try: SELECT starttime FROM attacktype_table WHERE starttime < DATE_SUB(CURDATE(),INTERVAL 30 DAY); Link to comment https://forums.phpfreaks.com/topic/195087-select-data-that-is-older-then-30-days/#findComment-1026133 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.