Skip to content

Commit b5fa8ab

Browse files
committed
Added Search by client Abbreviation to client and global search
1 parent bbb0db2 commit b5fa8ab

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

clients.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
LEFT JOIN locations ON clients.client_id = locations.location_client_id AND location_primary = 1
6060
LEFT JOIN client_tags ON client_tags.client_id = clients.client_id
6161
LEFT JOIN tags ON tags.tag_id = client_tags.tag_id
62-
WHERE (client_name LIKE '%$q%' OR client_type LIKE '%$q%' OR client_referral LIKE '%$q%'
62+
WHERE (client_name LIKE '%$q%' OR client_abbreviation LIKE '%$q%' OR client_type LIKE '%$q%' OR client_referral LIKE '%$q%'
6363
OR contact_email LIKE '%$q%' OR contact_name LIKE '%$q%' OR contact_phone LIKE '%$phone_query%'
6464
OR contact_mobile LIKE '%$phone_query%' OR location_address LIKE '%$q%'
6565
OR location_city LIKE '%$q%' OR location_state LIKE '%$q%' OR location_zip LIKE '%$q%'

global_search.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
$sql_clients = mysqli_query($mysqli, "SELECT * FROM clients
2424
LEFT JOIN locations ON clients.client_id = locations.location_client_id AND location_primary = 1
2525
WHERE client_archived_at IS NULL
26-
AND client_name LIKE '%$query%'
26+
AND (client_name LIKE '%$query%' OR client_abbreviation LIKE '%$query%')
2727
$access_permission_query
2828
ORDER BY client_id DESC LIMIT 5"
2929
);

0 commit comments

Comments
 (0)