Ninjakreborn Posted July 30, 2010 Share Posted July 30, 2010 I have a datetime field. Is there a Mysql function or PHP side something I can do to pull out only the results that are 4 days from today? Link to comment https://forums.phpfreaks.com/topic/209356-question-about-dates/ Share on other sites More sharing options...
Maq Posted July 30, 2010 Share Posted July 30, 2010 http://dev.mysql.com/doc/refman/5.1/en/date-and-time-functions.html#function_date-add Link to comment https://forums.phpfreaks.com/topic/209356-question-about-dates/#findComment-1093176 Share on other sites More sharing options...
Daniel0 Posted July 30, 2010 Share Posted July 30, 2010 I have a datetime field. Is there a Mysql function or PHP side something I can do to pull out only the results that are 4 days from today? function selectFromLastDays($num = 4) { // implementation left as an exercise for the reader } Link to comment https://forums.phpfreaks.com/topic/209356-question-about-dates/#findComment-1093181 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.