Sort primary location at the top always

This commit is contained in:
johnnyq 2023-07-03 17:41:43 -04:00
parent 567c01ce3f
commit 957b5b583c
1 changed files with 1 additions and 1 deletions

View File

@ -15,7 +15,7 @@ $sql = mysqli_query(
WHERE location_client_id = $client_id
AND location_archived_at IS NULL
AND (location_name LIKE '%$q%' OR location_address LIKE '%$q%' OR location_phone LIKE '%$phone_query%')
ORDER BY $sb $o LIMIT $record_from, $record_to"
ORDER BY location_primary DESC, $sb $o LIMIT $record_from, $record_to"
);
$num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));