From 472d78c0edd02777126eaf0103c9acb070bf9082 Mon Sep 17 00:00:00 2001 From: Zulfikar Raditya Hernanta Date: Thu, 20 Oct 2016 11:33:47 +0700 Subject: [PATCH] Fix order using string is not accepted --- system/db/builder/MySQLi.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/db/builder/MySQLi.php b/system/db/builder/MySQLi.php index 98b9064..0074170 100644 --- a/system/db/builder/MySQLi.php +++ b/system/db/builder/MySQLi.php @@ -179,7 +179,7 @@ public function delete() public function order($field, $asc=true) { - $this->order = "ORDER BY ".$this->fieldQuote($field)." ".($asc || strcasecmp($asc, 'asc')===0?'ASC':'DESC'); + $this->order = "ORDER BY ".$this->fieldQuote($field)." ".($asc===true || strcasecmp($asc, 'asc')===0?'ASC':'DESC'); return $this; }