Re: BOOKING SYSTEM

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



well I did it in the past, at the end after a lot of tests and
simulation i decided for

warehouse table

id_hotel, date, num_total_rooms, num_booked_rooms

this is day by day handling it is really flexible you can satisfy each
kind of request with very
simple queries
you also gain more flexibility in period definition you canalso easily
handling dsingle day workout and so on

 





2005/9/20, php @ net mines <php@xxxxxxxxxxx>:
> Hi all
> 
> I have a hotel booking system where for sppecific periods we have specific
> availability
> 
> e.g. hotel_id, hotel_name, hotel_fromperiod, hotel_toperiod,
> hotel_availablesinglerooms
> 1, Hilton, 20/06/05, 20/08/05, 20
> 
> We have a second table for recording the bookings
> 
> e.g.hotel1_id, hotel1_name, hotel1_fromperiod, hotel1_toperiod,
> hotel1_availablesinglerooms
> 1, Hilton, 01/07/05, 20/07/05, 1
> 2, Hilton, 20/06/05, 25/07/05, 1
> 3, Hilton, 25/06/05, 27/06/05, 19
> 4, Hilton, 05/07/05, 05/08/05, 2
> 
> Let's say that someone wants to book from the 25/06/05 - 29/06/05 what kind
> of function-SQL do I have to run to check whether there is availability?
> (in this example there should be availability between 27 and 29 but not
> between 25 and 27).
> 
> Is this way of structuring the easiest and more efficient?
> 
> Thank you
> 
> Mario
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
>

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux