Reputation: 2984
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 between time start and time end. how to do it ?
Upvotes: 0
Views: 143
Reputation: 17295
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
Upvotes: 1