From 7e69c5b00d5779aa41a4ce5bc74650f77c303bf9 Mon Sep 17 00:00:00 2001 From: Brady Miller Date: Sun, 3 Jun 2018 01:16:18 -0700 Subject: [PATCH] syntax error fix in recent commit --- library/ajax/document_helpers.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/library/ajax/document_helpers.php b/library/ajax/document_helpers.php index f918c3ba6..5fdd37201 100644 --- a/library/ajax/document_helpers.php +++ b/library/ajax/document_helpers.php @@ -32,13 +32,14 @@ function get_patients_list($req) { $term = "%" . $req['term'] . "%"; $clear = "- " . xl("Reset to no patient") . " -"; - $response = sqlStatement(" - SELECT CONCAT(fname, ' ',lname,IF(IFNULL(deceased_date,0)=0,'','*')) as label, pid as value - FROM patient_data + $response = sqlStatement( + "SELECT CONCAT(fname, ' ',lname,IF(IFNULL(deceased_date,0)=0,'','*')) as label, pid as value + FROM patient_data HAVING label LIKE ? ORDER BY IF(IFNULL(deceased_date,0)=0, 0, 1) ASC, IFNULL(deceased_date,0) DESC, lname ASC, fname ASC LIMIT " . escape_limit($req['sql_limit']), - array($term); + array($term) + ); $resultpd[] = array( 'label' => $clear, 'value' => '00' -- 2.11.4.GIT