Hello!
Is it possible to exclude date intervals in MySQL. Let's say: I have picked two dates
start_date = "2013-04-02"
and
end_date = "2013-04-12"
The table reservation
holds two columns for each item (items may not be with unique id's since many reservations are possible for a single item): reserved_from
and reserved_until
(both type = date).
Assume that for the first item
reserved_from = "2013-04-05"
and
reserved_until = "2013-04-07
Is it possible to select all items that are NOT reserved between the start date and the end date ? What about multiple reservations and special cases (reserved_from < "start_date"
, etc. )
Thank you!