From 9a5fe910991be8c58571b1e89539f5099de92422 Mon Sep 17 00:00:00 2001 From: thinkphp Date: Tue, 13 Sep 2016 12:39:22 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E8=BF=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/db/Builder.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/think/db/Builder.php b/library/think/db/Builder.php index 525a46ee..dd6d0f12 100644 --- a/library/think/db/Builder.php +++ b/library/think/db/Builder.php @@ -296,7 +296,7 @@ abstract class Builder } } $bindType = isset($binds[$field]) ? $binds[$field] : PDO::PARAM_STR; - if (is_scalar($value) && array_key_exists($field, $binds) && !in_array($exp, ['IN', 'NOT IN', 'BETWEEN', 'NOT BETWEEN']) && strpos($exp, 'TIME') === 0 && strpos($value, ':') !== 0 && !$this->query->isBind($field)) { + if (is_scalar($value) && array_key_exists($field, $binds) && !in_array($exp, ['IN', 'NOT IN', 'BETWEEN', 'NOT BETWEEN']) && strpos($exp, 'TIME') === false && strpos($value, ':') !== 0 && !$this->query->isBind($field)) { $this->query->bind($field, $value, $bindType); $value = ':' . $field; }