diff --git a/global_search.php b/global_search.php index 8e266e0d..9cba6465 100644 --- a/global_search.php +++ b/global_search.php @@ -22,8 +22,16 @@ if (isset($_GET['query'])) { $sql_logins = mysqli_query($mysqli, "SELECT * FROM logins WHERE (login_name LIKE '%$query%' OR login_description LIKE '%$query%') ORDER BY login_id DESC LIMIT 5"); $sql_invoices = mysqli_query($mysqli, "SELECT * FROM invoices LEFT JOIN clients ON invoice_client_id = client_id LEFT JOIN categories ON invoice_category_id = category_id - WHERE (CONCAT(invoice_prefix,invoice_number) LIKE '%$query%' OR invoice_scope LIKE '%$query%') ORDER BY invoice_number DESC LIMIT 5" -); + WHERE (CONCAT(invoice_prefix,invoice_number) LIKE '%$query%' OR invoice_scope LIKE '%$query%') ORDER BY invoice_number DESC LIMIT 5"); + + $sql_assets = mysqli_query($mysqli,"SELECT * FROM assets + LEFT JOIN contacts ON asset_contact_id = contact_id + LEFT JOIN locations ON asset_location_id = location_id + LEFT JOIN clients ON asset_client_id = client_id + WHERE asset_archived_at IS NULL + AND (asset_name LIKE '%$query%' OR asset_description LIKE '%$query%') + ORDER BY asset_name DESC LIMIT 5" + ); $q = nullable_htmlentities($_GET['query']); ?> @@ -361,7 +369,7 @@ if (isset($_GET['query'])) {
-
Invoices
+
Invoices
@@ -397,6 +405,97 @@ if (isset($_GET['query'])) { + +
+
+
+
+ + + + 0) { ?> + + + +
+
+
+
Assets
+
+
+ + + + + + + + + + + + $contact_name"; + } + $contact_archived_at = nullable_htmlentities($row['contact_archived_at']); + if (empty($contact_archived_at)) { + $contact_archived_display = ""; + } else { + $contact_archived_display = "Archived - "; + } + + $client_id = intval($row['asset_client_id']); + $client_name = nullable_htmlentities($row['client_name']); + + ?> + + + + + + + + + + +
AssetTypeSerialClientAssigned
+ + + + +