Hello and welcome to our community! Is this your first visit?
Register
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
    Posts
    24
    Thanks
    0
    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
    Super Moderator guelphdad's Avatar
    Join Date
    Mar 2006
    Location
    St. Catharines, Ontario Canada
    Posts
    2,634
    Thanks
    4
    Thanked 148 Times in 139 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
    •