mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-01 12:42:48 +08:00
改进order用法
This commit is contained in:
@@ -1503,7 +1503,11 @@ class Query
|
|||||||
if (!empty($this->options['via'])) {
|
if (!empty($this->options['via'])) {
|
||||||
$field = $this->options['via'] . '.' . $field;
|
$field = $this->options['via'] . '.' . $field;
|
||||||
}
|
}
|
||||||
$field = empty($order) ? $field : [$field => $order];
|
if (strpos($field, ',')) {
|
||||||
|
$field = array_map('trim', explode(',', $field));
|
||||||
|
} else {
|
||||||
|
$field = empty($order) ? $field : [$field => $order];
|
||||||
|
}
|
||||||
} elseif (!empty($this->options['via'])) {
|
} elseif (!empty($this->options['via'])) {
|
||||||
foreach ($field as $key => $val) {
|
foreach ($field as $key => $val) {
|
||||||
if (is_numeric($key)) {
|
if (is_numeric($key)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user