From b5fa8ab4de1e225ede83604751ab5f6db1f9d6cb Mon Sep 17 00:00:00 2001 From: johnnyq Date: Wed, 26 Mar 2025 17:56:40 -0400 Subject: [PATCH] Added Search by client Abbreviation to client and global search --- clients.php | 2 +- global_search.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/clients.php b/clients.php index e296a9b8..b5d3351d 100644 --- a/clients.php +++ b/clients.php @@ -59,7 +59,7 @@ $sql = mysqli_query( LEFT JOIN locations ON clients.client_id = locations.location_client_id AND location_primary = 1 LEFT JOIN client_tags ON client_tags.client_id = clients.client_id LEFT JOIN tags ON tags.tag_id = client_tags.tag_id - WHERE (client_name LIKE '%$q%' OR client_type LIKE '%$q%' OR client_referral LIKE '%$q%' + WHERE (client_name LIKE '%$q%' OR client_abbreviation LIKE '%$q%' OR client_type LIKE '%$q%' OR client_referral LIKE '%$q%' OR contact_email LIKE '%$q%' OR contact_name LIKE '%$q%' OR contact_phone LIKE '%$phone_query%' OR contact_mobile LIKE '%$phone_query%' OR location_address LIKE '%$q%' OR location_city LIKE '%$q%' OR location_state LIKE '%$q%' OR location_zip LIKE '%$q%' diff --git a/global_search.php b/global_search.php index a20f14e1..045c6ed5 100644 --- a/global_search.php +++ b/global_search.php @@ -23,7 +23,7 @@ if (isset($_GET['query'])) { $sql_clients = mysqli_query($mysqli, "SELECT * FROM clients LEFT JOIN locations ON clients.client_id = locations.location_client_id AND location_primary = 1 WHERE client_archived_at IS NULL - AND client_name LIKE '%$query%' + AND (client_name LIKE '%$query%' OR client_abbreviation LIKE '%$query%') $access_permission_query ORDER BY client_id DESC LIMIT 5" );