diff --git a/application/models/Appointments_model.php b/application/models/Appointments_model.php index 539a6e18..bf8d60fe 100644 --- a/application/models/Appointments_model.php +++ b/application/models/Appointments_model.php @@ -545,6 +545,7 @@ class Appointments_Model extends CI_Model { ->select('count(*) AS attendants_number') ->from('appointments') ->group_start() + ->group_start() ->where('start_datetime <=', $slot_start->format('Y-m-d H:i:s')) ->where('end_datetime >', $slot_start->format('Y-m-d H:i:s')) ->group_end() @@ -552,6 +553,7 @@ class Appointments_Model extends CI_Model { ->where('start_datetime <', $slot_end->format('Y-m-d H:i:s')) ->where('end_datetime >=', $slot_end->format('Y-m-d H:i:s')) ->group_end() + ->group_end() ->where('id_services', $service_id) ->get() ->row()