Hi, i am new in cakephp, and using CakePHP 4.3 and PHP 7.2.34 i want to calculate number of rooms availabel between checkin datetime and checkout datetime. group by room_type lets say
$checkin = ‘2023-07-18 20:00:00’ and $checkout = ‘2023-07-20 20:00:00’ $room_type_id =1;
checkout time is 24 hr…
SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ‘20:00:00 AND booking_details.checkin_date <= 2023-07-22 20:00:00 …’ at line 3
You’ll need to use expression functions for this, which is something I’m not very familiar with. Recommend that you post a new question, with the query you’re trying to execute and (important!) your attempt at writing it in Cake.