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. 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. 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
Archived
This topic is now archived and is closed to further replies.