Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2004
    Posts
    2

    Question Unanswered: 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

  2. #2
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •