From 9032818794ed00b52092443c3c862577cc2672e4 Mon Sep 17 00:00:00 2001 From: thinkphp Date: Sat, 17 Sep 2016 00:05:26 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E4=B8=80=E4=B8=AA=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=E6=9D=A1=E4=BB=B6=E5=A4=9A=E4=B8=AA=E6=9D=A1=E4=BB=B6?= =?UTF-8?q?=E7=9A=84=E6=97=B6=E5=80=99=E7=9A=84=E5=8F=82=E6=95=B0=E7=BB=91?= =?UTF-8?q?=E5=AE=9ABUG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/db/Builder.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/library/think/db/Builder.php b/library/think/db/Builder.php index 7a531e62..15a240ad 100644 --- a/library/think/db/Builder.php +++ b/library/think/db/Builder.php @@ -300,6 +300,9 @@ abstract class Builder $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 (strpos($value, ':') !== 0 || !$this->query->isBind(substr($value, 1))) { + if ($this->query->isBind($bindName)) { + $bindName .= '_' . uniqid(); + } $this->query->bind($bindName, $value, $bindType); $value = ':' . $bindName; }