query and output (date calculation)

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
braddock
Forum Newbie
Posts: 1
Joined: Tue Aug 17, 2004 6:41 pm

query and output (date calculation)

Post by braddock »

Hi, I am designing a hotel website in PHP and MySQL. I am having a problem with getting the room rate on a specified date. Can someone please help me with the query and output in PHP, this would be greatly appreciated. My tables are below.

Basically, when someone searches using arrival and departure dates, I would like the result page to show the hotel name, the room names, the hotel season name, and the rates for the dates in between arrival and departure, in order to show a quote

QUICK NOTE, I have not used PEAR before, if this is where the solution lies, please include short explanation.

Thanks in anticipation !

hotel_table
hotel_id (PK)
hotel_name

room_table
room_id (PK)
hotel_id (FK)
room_name

room_rate_table
room_rate_id (PK)
hotel_season_id (FK)
room_rate_name
room_rate_amount

hotel_season_table
hotel_season_id (PK)
hotel_id (FK)
hotel_season_name
hotel_season_start_date
hotel_season_end_date
Grim...
DevNet Resident
Posts: 1445
Joined: Tue May 18, 2004 5:32 am
Location: London, UK

Post by Grim... »

What code have you got so far?
We're not going to sit here and do your job for you :)
Post Reply