LightningSt Posted May 22, 2008 Share Posted May 22, 2008 I would like to make a query based on the date column i have. The problem I am having is that I would like to select everything where the date is everything before seven days ago. I have tried using curdate() dayofmonth() but either I am not using it correctly or I cannot do it that way. Any help would be appreciated. Link to comment https://forums.phpfreaks.com/topic/106808-date-select/ Share on other sites More sharing options...
rhodesa Posted May 22, 2008 Share Posted May 22, 2008 SELECT * FROM tablename WHERE datefield < DATE_SUB(NOW(), INTERVAL 7 DAY) Link to comment https://forums.phpfreaks.com/topic/106808-date-select/#findComment-547509 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.