i need to make a php code for checking hotel room avaibility where user from the present day can book rooms upto 90 days or less and there are total 30 rooms available in the hotel,so if once i store the data for a user like his booking from one date till another next time if i want to check the avaibility how should i do it in php,what would be the logic.
obviously i simple query like this isn't correct
for eg
$this->db->select('*')
->from('default_bookings')
->where('booking_from <',$input['fromdate'])
->where('booking_till >',$input['tilldate']);