mysql - How can I check for date range exists -
as may have noticed title, question quite difficult express, there problem:
i have mysql table data:
in registration form have specify reservation start , end times. how can check, whether there registered reservation specified time or not. example should not able put new reservation starts @ 13:20 , ends @ 15:00 etc.
if either start or end of new reservation want create inside current range, reservation should blocked. using :reservationstart
, :reservationend
these dates, query:
select * reservations :reservationstart between reservation_from , reservation_to or :reservationend between reservation_from , reservation_to or
Comments
Post a Comment