tet3828 Posted January 24, 2008 Share Posted January 24, 2008 ??? Im stumped on this one. here is my date range query SELECT * FROM tSession WHERE date BETWEEN 2008-01-10 AND 2008-01-22 I have the date 2008-1-15 as an entry in my table and it is returning zero results. help please Quote Link to comment https://forums.phpfreaks.com/topic/87650-solved-pesky-date-range-query/ Share on other sites More sharing options...
pocobueno1388 Posted January 24, 2008 Share Posted January 24, 2008 It might be that the date in your table isn't in proper format. Your date: 2008-1-15 Should be: 2008-01-15 That may not be it, but MySQL is pretty picky when it comes to dates. Quote Link to comment https://forums.phpfreaks.com/topic/87650-solved-pesky-date-range-query/#findComment-448347 Share on other sites More sharing options...
fenway Posted January 24, 2008 Share Posted January 24, 2008 Actually, it's because you haven't quoted your date literails. Quote Link to comment https://forums.phpfreaks.com/topic/87650-solved-pesky-date-range-query/#findComment-448372 Share on other sites More sharing options...
tet3828 Posted January 24, 2008 Author Share Posted January 24, 2008 the problem was the me forgetting to put ' ' around my dates. DOH! Quote Link to comment https://forums.phpfreaks.com/topic/87650-solved-pesky-date-range-query/#findComment-448399 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.