From ff4fa3f9b2042c8d3703dea832eef2daa96b27db Mon Sep 17 00:00:00 2001 From: Instrye Date: Fri, 2 Nov 2018 11:10:25 +0800 Subject: [PATCH] =?UTF-8?q?order=20=E5=AD=97=E6=AE=B5=E5=90=8D=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E5=88=86=E9=9A=94=E7=AC=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit order方法中的字段名 rank 不会自动添加 `` ,导致在某些MySQL版本中会报错 --- application/index/model/CronHandler.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/application/index/model/CronHandler.php b/application/index/model/CronHandler.php index d33062f5..053da87a 100644 --- a/application/index/model/CronHandler.php +++ b/application/index/model/CronHandler.php @@ -17,7 +17,7 @@ class CronHandler extends Model{ public $notifiedUid = []; public function __construct(){ - $this->cornTasks = Db::name('corn')->where('enable',1)->order('rank desc')->select(); + $this->cornTasks = Db::name('corn')->where('enable',1)->order('`rank` desc')->select(); $this->timeNow = time(); } @@ -123,4 +123,4 @@ class CronHandler extends Model{ } } -?> \ No newline at end of file +?>