mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-01 12:42:48 +08:00
Merge pull request #477 from hldh214/patch-4
修复 WHERE IN / NOT IN 型查询条件为空导致的 sql 语法错误
This commit is contained in:
@@ -379,7 +379,7 @@ abstract class Builder
|
||||
} else {
|
||||
$zone = implode(',', $this->parseValue($value, $field));
|
||||
}
|
||||
$whereStr .= $key . ' ' . $exp . ' (' . $zone . ')';
|
||||
$whereStr .= $key . ' ' . $exp . ' (' . (empty($zone) ? "''" : $zone) . ')';
|
||||
}
|
||||
} elseif (in_array($exp, ['NOT BETWEEN', 'BETWEEN'])) {
|
||||
// BETWEEN 查询
|
||||
|
||||
Reference in New Issue
Block a user