This is the schema I have for my hotel booking system.
Customer Table (CustomerID, title, Firstname, Surname, address, town, county,postcode,country, tel, email, password, confirmpassword)
Room Table (RoomID, roomtype, description)
Reservation Table (ReservationID, CustomerID, CheckIn, CheckOut, NumberofOccupants, TotalPrice)
Room_booking (ReservationID, RoomID)
The scenario is the following:
The user will select an arrival date, and departure date from the calendar, and then selects from the drop down list the room type they want. Say for example they select a standard room, for the 18/03/2015 to the 21/03/2015, but that room has alreadly been booked by another user for those dates. How can I can detect that this room is booked using an sql query???
I would be greatful if yous wonderful programmers on this site could help me on this?