|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
Stay one step ahead of the competition. Evaluate and give feedback
on some of the hottest web development tools on the market today.
Make your opinion heard! Click
Here
|
|
#1
|
|||
|
|||
|
Hi to evreyone!
I really need some help concerning my project at the university.I am doing a hotel reservation system with PHP and MySQL using Dreamweaver MX 2004. Can anyone advice me how to do the check availability callendar where a particular customer enters its arrival date, departure date,chooses a room type (Single,Double,Suite),number of adults,children and all these information are retrieved-linked to the MySQL database and return a particular result. Thanks in advance for spending your time reading my thread. Riginos |
|
#2
|
||||
|
||||
|
There are different ways to solve this. The one I'm thinking about,
needs at least 2 tables, say ROOM and AVAILABILITY. The table ROOM is intended to store all the data related to the room, like roomnumber, category, maximum number of persons, and perhaps some other stuff. The table AVAILABILITY would contain roomno, date, status, where status would be one of the following : free, unavailable (for example for a room which needs to be redecorated and cannot be occupied by customers) and occupied. When the status is "occupied", then a customer number should be added. I don't know about PHP, I'm more a java amateur. But I guess in PHP you can use variable just like in java. So, let's image a customer would give an arrival date and a departure date. In that case, you would get all the available rooms and the dates they are avalable on with the SQL instruction select * from ROOM, AVAILABILITY where ROOM.roomnumber = AVAILABILITY.roomnumber and AVAILABILITY.status = "free" and AVAILABILITY.date between arrivaldate and departuredate arrivaldate and departuredate are the variables which contain the 2 dates the customer has provided. |
![]() |
| Viewing: Dev Articles Community Forums > Databases > MySQL Development > hotel reservation system |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|