修正null查询的条件合并

This commit is contained in:
thinkphp
2017-01-12 12:17:53 +08:00
parent 1ab44ff8e7
commit b47fe5553b

View File

@@ -1158,13 +1158,15 @@ class Query
}
} elseif ($field && is_string($field)) {
// 字符串查询
$where[$field] = ['null', ''];
$where[$field] = ['null', ''];
$this->options['multi'][$logic][$field][] = $where[$field];
}
} elseif (is_array($op)) {
$where[$field] = $param;
} elseif (in_array(strtolower($op), ['null', 'notnull', 'not null'])) {
// null查询
$where[$field] = [$op, ''];
$where[$field] = [$op, ''];
$this->options['multi'][$logic][$field][] = $where[$field];
} elseif (is_null($condition)) {
// 字段相等查询
$where[$field] = ['eq', $op];