mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-07 23:22:48 +08:00
改进Builder类对field字符串的空格支持
This commit is contained in:
@@ -85,7 +85,7 @@ abstract class Builder
|
|||||||
if ('*' == $options['field']) {
|
if ('*' == $options['field']) {
|
||||||
$fields = array_keys($bind);
|
$fields = array_keys($bind);
|
||||||
} else {
|
} else {
|
||||||
$fields = is_array($options['field']) ? $options['field'] : explode(',', $options['field']);
|
$fields = is_array($options['field']) ? $options['field'] : array_map('trim', explode(',', $options['field']));
|
||||||
}
|
}
|
||||||
|
|
||||||
$result = [];
|
$result = [];
|
||||||
@@ -567,7 +567,7 @@ abstract class Builder
|
|||||||
if ('*' == $options['field']) {
|
if ('*' == $options['field']) {
|
||||||
$fields = $this->query->getTableInfo($options['table'], 'fields');
|
$fields = $this->query->getTableInfo($options['table'], 'fields');
|
||||||
} else {
|
} else {
|
||||||
$fields = is_array($options['field']) ? $options['field'] : explode(',', $options['field']);
|
$fields = is_array($options['field']) ? $options['field'] : array_map('trim', explode(',', $options['field']));
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach ($dataSet as &$data) {
|
foreach ($dataSet as &$data) {
|
||||||
|
|||||||
Reference in New Issue
Block a user