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 Quote 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); Quote 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
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.