I could really use your help with it(making reservations to hotels etc)
| From: | Siim Einfeldt aka Itpunk | Date: | Wed, 27 Dec 2000 21:25:22 +0000 |
| Subject: | I could really use your help with it(making reservations to hotels etc) | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-32010@lists.php.net to get a copy of this message | ||
I need some help with making reservations to a hotel. I have the following
information in the database:
(1) hotel name
(2) room type
(3) number of places within some days
(4) the first date
(5) the last second date
The first and the last date represent the time for which the travel agency
has made their reservations to some hotel and the number represents the
number of rooms reserved for this period of time.
That was now the back-end stuff... Now, when customer comes to their
website, he/she chooses a hotel, room type and then he also types in the
dates, when he would like to stay there (I have dropdowns for that).
OK, that was the story. What I would like to know is, what would be the
best way to get to know if there will be free rooms. The travelling agency
has made different reservations in hotels usually for 1-2 days,eg:
Time period: 24.01.2001 - 26.01.2001 Number of rooms: 10
Time period 26.01.2001 - 27.01.2001 Number of rooms: 3
Lets imagine that now comes the customer, types in the time period
25.01.2001 - 27.01.2001, it covers one one period fully and another only
partly. damn...sorry, I even don`t know what I need from you exactly, I
guess I`d like to know
-->how could I check if there was free rooms for the full period of time
that the customer has entered AND -->how to write to the database, that
one room from that period and one room from half of the other period has
been reserved?
I don`t know, maybe it seems simple, but...by now my brain is dead. If
someone could help me, I would really appreciate it, maybe if someone has
done some site for some travelling agency himself, you could get in touch
and explain this thing a bit.
braindead...
Siim Einfeldt
itpunk@itpunk.com