nezbie Posted June 6, 2006 Share Posted June 6, 2006 HiI'd need an example of a query how to SELECT data between two given dates in mysql, I need it for my search function..I think I'd need to somehow make sql convert given dates to different format than regular date (LIKE 2006-06-05)..So basicly something like this my query would be (english good, me Ralph :D):SELECT id FROM lists WHERE list_date_added BETWEEN 2006-06-01 AND 2006-06-06That doesn't ofcourse work, it's like I told SQL to SEE if an elephant is more than 3..Any help with this is appreciated greatly, thank you in advance! Quote Link to comment https://forums.phpfreaks.com/topic/11342-selecting-records-added-between-two-different-dates/ Share on other sites More sharing options...
fenway Posted June 9, 2006 Share Posted June 9, 2006 Should be fine -- just add quotes around your date to make them proper string literals. Quote Link to comment https://forums.phpfreaks.com/topic/11342-selecting-records-added-between-two-different-dates/#findComment-43538 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.