If ticket doesn't have a client dont show client section

This commit is contained in:
johnnyq
2025-11-15 16:51:31 -05:00
parent 46a1b673ba
commit 1e6e7fd6d8
4 changed files with 21 additions and 7 deletions

View File

@@ -29,8 +29,8 @@ if (isset($_GET['client_id'])) {
$sql = mysqli_query(
$mysqli,
"SELECT * FROM clients
LEFT JOIN locations ON clients.client_id = locations.location_client_id AND location_primary = 1
LEFT JOIN contacts ON clients.client_id = contacts.contact_client_id AND contact_primary = 1
LEFT JOIN locations ON client_id = location_client_id AND location_primary = 1
LEFT JOIN contacts ON client_id = contact_client_id AND contact_primary = 1
WHERE client_id = $client_id"
);