I use one table, mrp, to store the properties of several rooms and a second reservation table to save the dates on which the property was booked. So I have the following tables:
mrp (property_id, property_name, num_rooms)
booking (property_id, booking_id, date)
Whenever a property is booked, an entry is recorded in the reservation table and because there are several rooms in each table, it can have multiple orders on the same day.
I am using the following query:
SELECT * FROM mrp
WHERE property_id
NOT IN (SELECT property_id FROM booking WHERE `date` >= {$checkin_date} AND `date` <= {$checkout_date}
)
( , , ), , , . num_rooms, , , , .