mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-01 20:52:48 +08:00
Query类的view方法field参数支持字符串
This commit is contained in:
@@ -635,7 +635,7 @@ class Query
|
||||
* 指定JOIN查询字段
|
||||
* @access public
|
||||
* @param string|array $table 数据表
|
||||
* @param array $field 查询字段
|
||||
* @param string|array $field 查询字段
|
||||
* @param string|array $on JOIN条件
|
||||
* @param string $type JOIN类型
|
||||
* @return $this
|
||||
@@ -650,6 +650,9 @@ class Query
|
||||
} else {
|
||||
$fields = [];
|
||||
$table = $this->getTable($join);
|
||||
if (is_string($field)) {
|
||||
$field = explode(',', $field);
|
||||
}
|
||||
foreach ($field as $key => $val) {
|
||||
if (is_numeric($key)) {
|
||||
$fields[] = $join . '.' . $val;
|
||||
|
||||
Reference in New Issue
Block a user