drranch Posted November 18, 2007 Share Posted November 18, 2007 I ran the following query in MYSQL and its returning next yeards records... SELECT follow_up_date, DATE_FORMAT(follow_up_date, '%b %d, %Y') AS fdateformat, nick_name FROM showing WHERE follow_up_date >=DATE_SUB(CURDATE(), INTERVAL 7 DAY) AND username='{$_SESSION[loginUsername]}' ORDER BY follow_up_date DESC Any one know why? Quote Link to comment https://forums.phpfreaks.com/topic/77797-solved-date_subcurdate-interval-7-day-pulling-next-years-data/ Share on other sites More sharing options...
drranch Posted November 18, 2007 Author Share Posted November 18, 2007 SELECT follow_up_date, DATE_FORMAT(follow_up_date, '%b %d, %Y') AS fdateformat, nick_name FROM showing WHERE follow_up_date BETWEEN DATE_SUB(CURDATE(), INTERVAL 7 DAY) AND DATE_ADD(CURDATE(), INTERVAL 7 DAY) AND username='{$_SESSION[loginUsername]}' ORDER BY follow_up_date DESC Quote Link to comment https://forums.phpfreaks.com/topic/77797-solved-date_subcurdate-interval-7-day-pulling-next-years-data/#findComment-393779 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.