mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-01 12:42:48 +08:00
Query类的order方法支持多次调用合并
This commit is contained in:
@@ -1181,7 +1181,14 @@ class Query
|
||||
}
|
||||
}
|
||||
}
|
||||
$this->options['order'] = $field;
|
||||
if (!isset($this->options['order'])) {
|
||||
$this->options['order'] = [];
|
||||
}
|
||||
if (is_array($field)) {
|
||||
$this->options['order'] = array_merge($this->options['order'], $field);
|
||||
} else {
|
||||
$this->options['order'][] = $field;
|
||||
}
|
||||
}
|
||||
return $this;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user