How to get Room Available between checkin datetime and checkout datetime

38 Views Asked by At

I have 3 tables in my database. First table is rooms , second table is booking_details and third is reserved_rooms. i user cakephp4.2, mysql.

rooms Table enter image description here

booking_details Table enter image description here

reserved_rooms Table enter image description here

cakephp query search form fields checkin, checkout & room_type

lets say checkin = 2023-07-12 20:00:00, checkout = 2023-07-14 20:00:00, room_type = 1

how to get all room available between above search parameter and my checkout time is 24 hr.

0

There are 0 best solutions below