MySQL Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsDatabasesMySQL Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
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  
Old March 6th, 2005, 04:29 PM
riginosz riginosz is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Mar 2005
Posts: 2 riginosz User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 19 m 24 sec
Reputation Power: 0
Exclamation hotel reservation system

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

Reply With Quote
  #2  
Old March 28th, 2005, 11:11 AM
gertcuppens's Avatar
gertcuppens gertcuppens is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: May 2004
Posts: 118 gertcuppens User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 17 h 28 m
Reputation Power: 5
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.

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsDatabasesMySQL Development > hotel reservation system


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway