These days I am working hard for my degree project on Hotel Room Reservation System.
Now I strucked at the check availability stage.
Here is my table structure
Bookings
`ID` int(11)
`roomID` int(11)
`startDate` date
`endDate` date
Rooms table
`roomID` int(11)
`name` varchar(255)
`facilities` mediumtext
Imagine there are 5 rooms. roomIDs are 01,02,03,04 and 05.
amoung these rooms, 01 is booked. checkin date is 05-11-2013 & checkout date is 10-11-2013.
And also roomID 04, booked in 08-11-2013 to 09-11-2013
If user check availability from 04-11-2013 to 10-11-2013, only room ID 02,03 and 05 should display.
How can I build a system to display result?
Can someone help me to build sql query to check availability?