I have in my database MySQL:
id | text | date_start | date_stop
1 | aa | 2011-12-17 10:45:00 | 2011-12-18 15:33:00
2 | aa | 2011-12-18 19:11:44 | 2011-12-20 10:10:19
3 | aa | 2011-12-21 15:14:00 | 2011-12-23 11:21:00
and i want check if example date is in database.
for example i im giving:
date_start: 2011-12-17 11:11:11 and date_stop 2011-12-18 16:11:11
this should return false.
date_start: 2011-12-20 11:11:11 and date_stop 2011-12-21 11:11:11
this should return true.
how can i make this? which query should be for this in SQL?
if you have a result, its false, else true.