开发者

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
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜