From 7f3c605a5698771951d8b37ccd1c3827d71cb3e4 Mon Sep 17 00:00:00 2001 From: Nate Date: Tue, 13 Aug 2019 11:01:57 -0600 Subject: [PATCH] Modification to order_by() function. --- resources/functions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/functions.php b/resources/functions.php index d87b53ea35..9b0c1ab8ba 100644 --- a/resources/functions.php +++ b/resources/functions.php @@ -2124,7 +2124,7 @@ function number_pad($number,$n) { //validate and format order by clause of select statement if (!function_exists('order_by')) { - function order_by($col, $dir, $col_default = '') { + function order_by($col, $dir, $col_default = '', $dir_default = 'asc') { $col = preg_replace('#[^a-zA-Z0-9-_.]#', '', $col); $dir = strtolower($dir) == 'desc' ? 'desc' : 'asc'; if ($col != '') { return ' order by '.$col.' '.$dir.' '; }