mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-01 12:42:48 +08:00
改进
This commit is contained in:
@@ -191,7 +191,7 @@ abstract class Builder
|
||||
} elseif (!is_numeric($key)) {
|
||||
$array[] = $this->parseKey($key, $options) . ' AS ' . $this->parseKey($field, $options, true);
|
||||
} else {
|
||||
$array[] = $this->parseKey($field, $options, true);
|
||||
$array[] = $this->parseKey($field, $options);
|
||||
}
|
||||
}
|
||||
$fieldsStr = implode(',', $array);
|
||||
@@ -579,8 +579,8 @@ abstract class Builder
|
||||
} else {
|
||||
$sort = $val;
|
||||
}
|
||||
|
||||
$sort = in_array(strtolower($sort), ['asc', 'desc'], true) ? ' ' . $sort : '';
|
||||
$sort = strtoupper($sort);
|
||||
$sort = in_array($sort, ['ASC', 'DESC'], true) ? ' ' . $sort : '';
|
||||
$array[] = $this->parseKey($key, $options, true) . $sort;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user