I have a table in which room orders are stored, diagram:
ID | ROOM_ID | CHECK_IN_DATE | CHECK_OUT_DATE | USER_ID
I need to run a search query for rooms that are available / inaccessible between the set date range.
Also keep in mind that there is another table that contains the dates when the room was previously reserved, and its format:
ROOM_ID | DATE
SO I need to run a query that searches for available rooms within a given range. How would I formulate a request? I am using MySQL here.
--- edit ---
Theres also a table of rooms schemes:
ID | ROOM DETAILS etc
/ , , - , : ..