改进where方法的相同字段多次查询

This commit is contained in:
thinkphp
2017-01-13 17:53:11 +08:00
parent f37a5e8f55
commit 1e8e169b0a

View File

@@ -1169,8 +1169,10 @@ class Query
$this->options['multi'][$logic][$field][] = $where[$field];
} elseif (is_null($condition)) {
// 字段相等查询
$where[$field] = ['eq', $op];
$this->options['multi'][$logic][$field][] = $where[$field];
$where[$field] = ['eq', $op];
if ('AND' != $logic) {
$this->options['multi'][$logic][$field][] = $where[$field];
}
} else {
$where[$field] = [$op, $condition, isset($param[2]) ? $param[2] : null];
if ('exp' == strtolower($op) && isset($param[2]) && is_array($param[2])) {