Hey there experts :) ,
I am building a system for booking a room, and I now need to work out how to tell if the room is already booked during the a requested time period
In a booking table on my mysql database I have two datetime fields called "start" and "end" which contain the begining and ending times of each booking.
How do I write a query that compares a requested "start" and "end" with those already in the database and determins if the time period is available or not?
If a user reqest a booking to start: 2010/05/12 08:00 and end: 2010/05/12 10:00
I need to be able to compare this to my bookings table and check if the period between 8 and 10 oclock on the 12th april 2010 is already taken