| Welcome to WebmasterWorld Guest from 184.108.40.206 |
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
|Become a Pro Member|
|mysql query with date search|
| 7:47 pm on Jan 6, 2011 (gmt 0)|
I have a table which has dates for events.
the mysql column type is datetime
Now I have a calendar which returns date only (not time)
and I have full date and time both in mysql records.
So I want to run the query so it searches for all the events in that specific date?
thanks in advance.
| 8:13 pm on Jan 6, 2011 (gmt 0)|
Optimized way (if you have millions of records):
where event_date > "$date 00:00:00" and event_date <= "$date 23:59:59"
| 8:25 pm on Jan 6, 2011 (gmt 0)|
thanks very much for helping. Yes, I already tried with DATE() and it worked perfectly fine.
Thanks again for your help.
All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved