...

View Full Version : MySQL Reservation Problem



danbopes
02-12-2007, 07:27 PM
I have a products table that has a bunch of products, and I need a query that will query another table and find out if there are any reservations for the project during a set period.

For instance, I have three things:
1. Car
2. Boat
3. Toy

The boat is reserved on 2-12-07 to 2-16-07 and the others are not reserved. I need a way to do it in one query if I give to days to query another table to just see if there is a reservation for that time period.

If I type in 2-10-07 to 2-15-07 I should find the Car and Toy unreserved, but the Boat reserved. I know I can do a loop, but when I have 131 products, its alot of queries to access the database.

guelphdad
02-12-2007, 07:42 PM
see the room vacancies link in my signature, you may need to adapt it to suit your needs.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum