ainoy31 Posted September 12, 2007 Share Posted September 12, 2007 Hello- I am trying to display records that are 30 days from the current time. Someone suggested the following: select * from table WHERE date_column BETWEEN CURDATE() and DATE_SUB(CURDATE(),INTERVAL 30 DAY) However, it is not working. Much appreciation. Quote Link to comment https://forums.phpfreaks.com/topic/69110-solved-display-records-30-days-from-now/ Share on other sites More sharing options...
ainoy31 Posted September 12, 2007 Author Share Posted September 12, 2007 Nevermind. I figured it out. had to use the DATE_ADD() NOT THE DATE_SUB. Quote Link to comment https://forums.phpfreaks.com/topic/69110-solved-display-records-30-days-from-now/#findComment-347399 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.