tags:

views:

16

answers:

1

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 ?

+1  A: 
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
Māris Kiseļovs
thank to you , i will try it
Chameron