Advertisement
orfen

Untitled

Feb 21st, 2013
306
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MySQL 0.22 KB | None | 0 0
  1. /* overlapping dates */
  2. SELECT *
  3. FROM my_table
  4. WHERE `date` = $date AND
  5.   NOT (
  6.     `start_time` < $start_time and `finish_time` < $start_time
  7.     OR
  8.     `start_time` > $end_time and `finish_time` > $end_time
  9.   )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement