RE: Reservation technique

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

 



> How will a PHP script perform such checking to prevent that sort of
> overlapping in reservation ? Or could it be that my database design is bad
> that's blocking ideas into my head ?

Hi Roger,

I think you need to check out the BETWEEN operator in MySQL (assuming you're
using MySQL? Look for the equivalent operator in whatever db platform you're
using, if otherwise). Essentially what you're looking to do is find out if
either the start time or the end time of the new booking falls BETWEEN the
start time or the end time of an existing booking. If either of them does,
it's safe to assume there's a booking conflict.

Much warmth,

Murray
http://www.planetthoughtful.org
Building a thoughtful planet,
One quirky comment at a time.

-- 
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