内核更新

This commit is contained in:
2017-02-06 17:22:50 +08:00
parent 5e41d6862a
commit 689376a5d9
13 changed files with 213 additions and 91 deletions

View File

@@ -250,7 +250,10 @@ abstract class Builder
// 使用闭包查询
$query = new Query($this->connection);
call_user_func_array($value, [ & $query]);
$str[] = ' ' . $key . ' ( ' . $this->buildWhere($query->getOptions('where'), $options) . ' )';
$whereClause = $this->buildWhere($query->getOptions('where'), $options);
if (!empty($whereClause)) {
$str[] = ' ' . $key . ' ( ' . $whereClause . ' )';
}
} elseif (strpos($field, '|')) {
// 不同字段使用相同查询条件OR
$array = explode('|', $field);