order 字段名添加分隔符
order方法中的字段名 rank 不会自动添加 `` ,导致在某些MySQL版本中会报错
This commit is contained in:
parent
d9fa51a615
commit
ff4fa3f9b2
1 changed files with 2 additions and 2 deletions
|
@ -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{
|
|||
}
|
||||
|
||||
}
|
||||
?>
|
||||
?>
|
||||
|
|
Loading…
Add table
Reference in a new issue