From a05551ba74c7284cc62347dbf67c3a2e7b54a5b9 Mon Sep 17 00:00:00 2001 From: Vadim Serdunich Date: Wed, 13 Sep 2023 17:27:19 +0300 Subject: [PATCH 1/2] Fix search Appointments_model --- application/models/Appointments_model.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/application/models/Appointments_model.php b/application/models/Appointments_model.php index 1c385d56..51ac435f 100644 --- a/application/models/Appointments_model.php +++ b/application/models/Appointments_model.php @@ -470,7 +470,7 @@ class Appointments_model extends EA_Model { ->from('appointments') ->join('services', 'services.id = appointments.id_services', 'left') ->join('users AS providers', 'providers.id = appointments.id_users_provider', 'inner') - ->join('users AS customers', 'customers.id = appointment.id_users_customer', 'left') + ->join('users AS customers', 'customers.id = appointments.id_users_customer', 'left') ->where('is_unavailability', FALSE) ->group_start() ->like('appointments.start_datetime', $keyword) @@ -478,8 +478,8 @@ class Appointments_model extends EA_Model { ->or_like('appointments.location', $keyword) ->or_like('appointments.hash', $keyword) ->or_like('appointments.notes', $keyword) - ->or_like('service.name', $keyword) - ->or_like('service.description', $keyword) + ->or_like('services.name', $keyword) + ->or_like('services.description', $keyword) ->or_like('providers.first_name', $keyword) ->or_like('providers.last_name', $keyword) ->or_like('providers.email', $keyword) From 193205bfc0fea5ddab20bb8ee88998a6b6c08aa4 Mon Sep 17 00:00:00 2001 From: Vadim Serdunich Date: Thu, 14 Sep 2023 19:39:52 +0300 Subject: [PATCH 2/2] Fix search Appointments_model: appointments id field --- application/models/Appointments_model.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/models/Appointments_model.php b/application/models/Appointments_model.php index 51ac435f..7ac2e5cd 100644 --- a/application/models/Appointments_model.php +++ b/application/models/Appointments_model.php @@ -466,7 +466,7 @@ class Appointments_model extends EA_Model { $appointments = $this ->db - ->select() + ->select('appointments.*') ->from('appointments') ->join('services', 'services.id = appointments.id_services', 'left') ->join('users AS providers', 'providers.id = appointments.id_users_provider', 'inner')