mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-08 15:42:48 +08:00
修正一个查询条件多个条件的时候的参数绑定BUG
This commit is contained in:
@@ -300,6 +300,9 @@ abstract class Builder
|
|||||||
$bindType = isset($binds[$field]) ? $binds[$field] : PDO::PARAM_STR;
|
$bindType = isset($binds[$field]) ? $binds[$field] : PDO::PARAM_STR;
|
||||||
if (is_scalar($value) && array_key_exists($field, $binds) && !in_array($exp, ['EXP', 'NOT NULL', 'NULL', 'IN', 'NOT IN', 'BETWEEN', 'NOT BETWEEN']) && strpos($exp, 'TIME') === false) {
|
if (is_scalar($value) && array_key_exists($field, $binds) && !in_array($exp, ['EXP', 'NOT NULL', 'NULL', 'IN', 'NOT IN', 'BETWEEN', 'NOT BETWEEN']) && strpos($exp, 'TIME') === false) {
|
||||||
if (strpos($value, ':') !== 0 || !$this->query->isBind(substr($value, 1))) {
|
if (strpos($value, ':') !== 0 || !$this->query->isBind(substr($value, 1))) {
|
||||||
|
if ($this->query->isBind($bindName)) {
|
||||||
|
$bindName .= '_' . uniqid();
|
||||||
|
}
|
||||||
$this->query->bind($bindName, $value, $bindType);
|
$this->query->bind($bindName, $value, $bindType);
|
||||||
$value = ':' . $bindName;
|
$value = ':' . $bindName;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user