robert_gsfame Posted July 29, 2010 Share Posted July 29, 2010 i have this query SELECT * FROM table1 WHERE date BETWEEN '2009-07-08' AND '2010-10-08' the problem is that i wish to display all records including records which were saved at 2009-07-08 and 2010-10-08 thx Quote Link to comment https://forums.phpfreaks.com/topic/209211-between-problem/ Share on other sites More sharing options...
PFMaBiSmAd Posted July 29, 2010 Share Posted July 29, 2010 BETWEEN is inclusive of the min and max values. Did you even try the query that you posted? Quote Link to comment https://forums.phpfreaks.com/topic/209211-between-problem/#findComment-1092554 Share on other sites More sharing options...
robert_gsfame Posted July 29, 2010 Author Share Posted July 29, 2010 yes n i dont get the record of both min and max Quote Link to comment https://forums.phpfreaks.com/topic/209211-between-problem/#findComment-1092582 Share on other sites More sharing options...
robert_gsfame Posted July 29, 2010 Author Share Posted July 29, 2010 okay...i think i have to check the loop first..thx anyway Quote Link to comment https://forums.phpfreaks.com/topic/209211-between-problem/#findComment-1092583 Share on other sites More sharing options...
PFMaBiSmAd Posted July 29, 2010 Share Posted July 29, 2010 If you didn't get the min and max values, then your date column is probably not just the date and you would need to put the mysql DATE() function around it. Quote Link to comment https://forums.phpfreaks.com/topic/209211-between-problem/#findComment-1092585 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.