PHP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingPHP 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:
  #1  
Old March 6th, 2005, 05:26 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
Unhappy 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 11th, 2005, 12:28 PM
LeValdemar LeValdemar is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Mar 2005
Location: Ukraine
Posts: 1 LeValdemar User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 5 m 55 sec
Reputation Power: 0
Send a message via ICQ to LeValdemar Send a message via MSN to LeValdemar Send a message via Yahoo to LeValdemar
db schema

Hi, Riginos.

In simple mode I think will be:
table rooms (
RoomID, Quantity, Type (set(Singel, Double, Suite) )
);

table orders (
OrderID,
RoomID,
Personal_Info( Adults, children ) - may use another table...
Date_Arrive
Date_Departure
);

select (r.Quantity - count( OrderID)) as AvailableRooms from orders o, rooms r where r.Type='Single' and r.RoomID=o.RoomID and Date_Arrive < DayNow and DayNow+1 <= Date_Departure;

DayNow - use from php you need. So, you will get the function for one of type for the selected day.

P.S. I am not sure that this sql query will work, but you can use this in two queries.
select Type, Quantity from rooms;
select count( OrderID ) as UnAvailableRooms ...

Reply With Quote
  #3  
Old March 12th, 2005, 04:45 AM
genux33 genux33 is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Mar 2005
Posts: 2 genux33 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 33 m 57 sec
Reputation Power: 0
you may use this function
checkdate (int month, int day, int year).

it return you true if the date is valid and false when the date do not exist ( for example 31st feb 2005.)

Quote:
Originally Posted by riginosz
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
Reply

Viewing: Dev Articles Community ForumsProgrammingPHP 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 6 hosted by Hostway
Stay green...Green IT