改进Query类的field方法

This commit is contained in:
thinkphp
2016-08-11 16:28:40 +08:00
parent 5a612058ef
commit d76137382c

View File

@@ -747,9 +747,9 @@ class Query
}
if (isset($this->options['field'])) {
$field = $this->options['field'] + $field;
$field = array_merge($this->options['field'], $field);
}
$this->options['field'] = $field;
$this->options['field'] = array_unique($field);
return $this;
}