HI there
REALLY hope someone can help.
I am trying to make a little hotel reservation system (using flash, PHP and mySQL) and am really confused as to how I can represent accurately the calendar year and how to query the database to check (1)availability of rooms for a particular time period (2)available rooms & booked rooms for particular month.
I already have 3 tables : bookings, room & clients.
Table called clients contains info on the guest like ID, address etc.
Table called room contains details of a room like roomID etc.
Table called bookings contains details like roomID, clientID, startDate, endDate
Do i have to create tables for each month in a given year recording the rooms status? e.g. tables called May Rooms, June Rooms?
Do i have to hard code the exact amount of days in each month for any given year?
I just am really confused about querying the database
Any help would be soooooooo appreciated