Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    May 2006
    Thanked 4 Times in 4 Posts

    MySQL Reservation Problem

    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.

  2. #2
    Super Moderator guelphdad's Avatar
    Join Date
    Mar 2006
    St. Catharines, Ontario Canada
    Thanked 149 Times in 140 Posts
    see the room vacancies link in my signature, you may need to adapt it to suit your needs.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts