From 728c0fc21e9b438b930b916a8257a25ea9ffaf79 Mon Sep 17 00:00:00 2001 From: thinkphp Date: Wed, 12 Sep 2018 18:02:21 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E8=BF=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ThinkPHP/Library/Think/Db/Driver.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ThinkPHP/Library/Think/Db/Driver.class.php b/ThinkPHP/Library/Think/Db/Driver.class.php index 6a64f58e2..66361ffc1 100644 --- a/ThinkPHP/Library/Think/Db/Driver.class.php +++ b/ThinkPHP/Library/Think/Db/Driver.class.php @@ -764,7 +764,7 @@ protected function parseOrder($order) if (false === strpos($val, '(')) { $array[] = $this->parseKey($val); } - } else { + } elseif (false === strpos($key, ')') && false === strpos($key, '#')) { $sort = in_array(strtolower($val), array('asc', 'desc')) ? ' ' . $val : ''; $array[] = $this->parseKey($key, true) . $sort; }