php + mysql : find data by time end & time start
event table have two fields start and end and all in datetime format
This is query
SELECT e.* FROM jos_events e
WHERE 1=1
AND e.start >= 2006-07-10
AND e.end <= 2015-10-21
ORDER BY e.id DESC
i want to find events 开发者_Go百科between time start and time end. how to do it ?
SELECT e.* FROM jos_events e
WHERE
AND e.start <= '2006-07-10 00:00:00'
AND e.end >= '2015-10-21 23:59:59'
ORDER BY e.id DESC
精彩评论