Hi I am trying to make a on line reservation system for villas, what I need to do is show which villas are not booked when the user enters a start and end date so far i have 2 querys one checks the dates and shows the villas that are booked for the dates the second does a left join and links the results to show a null record if the villa is booked however I do not know how to link the 2 queries. here is the code for the 1st query.
this is recordset 1
SELECT room
FROM bookings
WHERE startdate BETWEEN 'start' AND 'end' OR enddate BETWEEN 'start' AND 'end'
this is record set 2
SELECT *
FROM homes LEFT JOIN bookings ON homes.room = bookings.room
WHERE bookings.room IS NULL
Please can someone help!!!