logic for a php function

Posted by danish hashmi on Stack Overflow See other posts from Stack Overflow or by danish hashmi
Published on 2012-07-06T09:06:08Z Indexed on 2012/07/06 9:15 UTC
Read the original article Hit count: 330

Filed under:
|

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']);

© Stack Overflow or respective owner

Related posts about php

Related posts about mysql