elyasn Posted March 6, 2008 Share Posted March 6, 2008 i am trying to display records that are less then 30 days old. i used DATE_SUB(CURDATE(),INTERVAL 30 DAY) but poroblem with date_ sub is it will show the futre dates too. i want to be able to only dispaly dates for the past 30 days. is there a way i can achive this with timstamp? Link to comment https://forums.phpfreaks.com/topic/94701-how-to-display-records-that-are-less-then-30-days-old/ Share on other sites More sharing options...
beebum Posted March 6, 2008 Share Posted March 6, 2008 ...WHERE date BETWEEN (DATE_DUB(CURDATE(), INTERVAL 30 DAY)) AND CURDATE(); Link to comment https://forums.phpfreaks.com/topic/94701-how-to-display-records-that-are-less-then-30-days-old/#findComment-484852 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.