Date Intervals and MySQL -
hello!
is possible exclude date intervals in mysql. let's say: have picked 2 dates
start_date = "2013-04-02"
and
end_date = "2013-04-12"
the table reservation
holds 2 columns each item (items may not unique id's since many reservations possible single item): reserved_from
, reserved_until
(both type = date).
assume first item
reserved_from = "2013-04-05"
and
reserved_until = "2013-04-07
is possible select items not reserved between start date , end date ? multiple reservations , special cases (reserved_from < "start_date"
, etc. )
thank you!
try:
not between start_date , end_date
it select items dates not present in between both.
Comments
Post a Comment