I’m trying to query a database to get all references to a particular range of dates, if somebody books a time slot all other timeslots should be altered to not allow booking.
If I use the following script for ‘X’ then ‘Y’ gets removed but if I use the script for ‘Y’ then ‘X’ doesn’t get called because the timestamps are out of the script.
Each booking has a start date and end date.
SELECT * FROM bookings WHERE bref=‘$van’ AND ((bookingstart BETWEEN start AND end) OR (bookingend BETWEEN start AND end));
I need to associate all possible crossovers with each booking.