If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > calender booking system

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 02-10-04, 05:56
jamiejelly jamiejelly is offline
Registered User
 
Join Date: Jan 2004
Posts: 2
Question calender booking system

Hi,
I am developing a database for someone who deals with holiday home rentals. He wants a website that will display a calender of each holiday homes availability. The call centre staff will use a backend system to book the holiday home and all this will be running from a MySQL server.

Can anyone tell me how to structure the bookings/dates tables so I can display an entire month highlighting in some way the dates that are unavailable?

thanks
Reply With Quote
  #2 (permalink)  
Old 02-10-04, 06:43
reneeb reneeb is offline
Registered User
 
Join Date: Jan 2004
Location: Germany
Posts: 167
I would suggest that you need the following tables (it's not complete, but you can extend it on your own):

home:
id (primary key)
short_name
description

calendar:
start_date
end_date
home_id (foreign key)
customer_id(foreign key)

customer:
c_id (primary key)
firstname
lastname
street
zip
town
country
telephone
fax
email

In your insert-queries you have to ensure the start or end_date is between in an existing duration for that accomodation

in a select-statement you get the duration of someone's vacation and you mark these days red...

I hope you can get my idea...
__________________
board.perl-community.de - The German Perl-Community
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On