Hi,
I'm wondering if anyone can help me with a query? I have 3 tables in phpmyadmin, vehicles, drivers, and bookings.
I need to make a booking in the bookings table (primary keys are DriverID, VehicleID, BookingDate) this will ensure its a unique booking and the DriverID, VehicleID need to be checked as valid from the other tables. (if there is no driverID record, you can't make a booking, no vehicleID...you can't make a booking) there will also be a requirement to make sure I don't have a double booking but I'm not worried about that right now!
I can see its a select statement with where and "and" conditions... but I'm blank as to what it would be. I'd really appreciate any help :)
Thanks in advance from newbie :)