djones Posted February 2, 2008 Share Posted February 2, 2008 Currently in my query I'm checking to see if the curdate() is within the start date and end date. AND CURDATE() >= s_date AND CURDATE() <= e_date Is there a better way to do this on one line instead of two ANDs? Quote Link to comment https://forums.phpfreaks.com/topic/89100-solved-query-by-dates-in-between-dates-better-way-than-this/ Share on other sites More sharing options...
pocobueno1388 Posted February 2, 2008 Share Posted February 2, 2008 Try WHERE CURDATE() BETWEEN s_date AND e_date Quote Link to comment https://forums.phpfreaks.com/topic/89100-solved-query-by-dates-in-between-dates-better-way-than-this/#findComment-456355 Share on other sites More sharing options...
djones Posted February 2, 2008 Author Share Posted February 2, 2008 Thanks! Quote Link to comment https://forums.phpfreaks.com/topic/89100-solved-query-by-dates-in-between-dates-better-way-than-this/#findComment-456369 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.