Re: hotel reservations
| From: | Richard Lynch | Date: | Wed, 27 Sep 2006 16:25:59 +0000 |
| Subject: | Re: hotel reservations | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-242311@lists.php.net to get a copy of this message | ||
SMTP server errors and a too-quick click made me close the message I
sent with all the nifty thread-ness... sorry.
//make reservation
insert into reservation(room_number, start_date, end_date)
values ('504', '12/10/2006', '14/10/2006')
//reservation inquiry for 13/10/2006:
select room_number
from room
where room_number not in
(select room_number
from reservation
where '13/10/2006' between start_date and end_date
)
The rest of the application is left as an exercise to the reader. :-)
--
Like Music?
http://l-i-e.com/artists.htm