From 0ee1f5cb0aab4c054e2fee50d3adb369859b270b Mon Sep 17 00:00:00 2001 From: Alex Tselegidis Date: Mon, 12 Dec 2022 09:15:55 +0100 Subject: [PATCH] Allow the user to filter by the entire user name --- application/models/Admins_model.php | 1 + application/models/Customers_model.php | 1 + application/models/Providers_model.php | 1 + application/models/Secretaries_model.php | 1 + 4 files changed, 4 insertions(+) diff --git a/application/models/Admins_model.php b/application/models/Admins_model.php index f1357330..357ed6ad 100644 --- a/application/models/Admins_model.php +++ b/application/models/Admins_model.php @@ -544,6 +544,7 @@ class Admins_model extends EA_Model { ->group_start() ->like('first_name', $keyword) ->or_like('last_name', $keyword) + ->or_like('CONCAT_WS(" ", first_name, last_name)', $keyword) ->or_like('email', $keyword) ->or_like('phone_number', $keyword) ->or_like('mobile_number', $keyword) diff --git a/application/models/Customers_model.php b/application/models/Customers_model.php index 3293b483..8bbdb3f2 100644 --- a/application/models/Customers_model.php +++ b/application/models/Customers_model.php @@ -444,6 +444,7 @@ class Customers_model extends EA_Model { ->group_start() ->like('first_name', $keyword) ->or_like('last_name', $keyword) + ->or_like('CONCAT_WS(" ", first_name, last_name)', $keyword) ->or_like('email', $keyword) ->or_like('phone_number', $keyword) ->or_like('mobile_number', $keyword) diff --git a/application/models/Providers_model.php b/application/models/Providers_model.php index d9283898..e64ececa 100755 --- a/application/models/Providers_model.php +++ b/application/models/Providers_model.php @@ -735,6 +735,7 @@ class Providers_model extends EA_Model { ->group_start() ->like('first_name', $keyword) ->or_like('last_name', $keyword) + ->or_like('CONCAT_WS(" ", first_name, last_name)', $keyword) ->or_like('email', $keyword) ->or_like('phone_number', $keyword) ->or_like('mobile_number', $keyword) diff --git a/application/models/Secretaries_model.php b/application/models/Secretaries_model.php index 179f268a..0f2ee758 100644 --- a/application/models/Secretaries_model.php +++ b/application/models/Secretaries_model.php @@ -588,6 +588,7 @@ class Secretaries_model extends EA_Model { ->group_start() ->like('first_name', $keyword) ->or_like('last_name', $keyword) + ->or_like('CONCAT_WS(" ", first_name, last_name)', $keyword) ->or_like('email', $keyword) ->or_like('phone_number', $keyword) ->or_like('mobile_number', $keyword)