mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-01 20:52:48 +08:00
改进Query类的field方法
This commit is contained in:
@@ -602,12 +602,12 @@ class Query
|
||||
return $this;
|
||||
}
|
||||
if (is_string($field)) {
|
||||
$field = explode(',', $field);
|
||||
$field = array_map('trim', explode(',', $field));
|
||||
}
|
||||
if (true === $field) {
|
||||
// 获取全部字段
|
||||
$fields = $this->getTableInfo($tableName, 'fields');
|
||||
$field = $fields ?: '*';
|
||||
$field = $fields ?: ['*'];
|
||||
} elseif ($except) {
|
||||
// 字段排除
|
||||
$fields = $this->getTableInfo($tableName, 'fields');
|
||||
|
||||
Reference in New Issue
Block a user