From 57f855e01d2a1d979507fcee447927dddd34f615 Mon Sep 17 00:00:00 2001 From: thinkphp Date: Sun, 17 Apr 2016 09:32:07 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3builder?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/db/Builder.php | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/library/think/db/Builder.php b/library/think/db/Builder.php index 45987515..3e43822d 100644 --- a/library/think/db/Builder.php +++ b/library/think/db/Builder.php @@ -84,13 +84,9 @@ abstract class Builder } elseif (is_null($val)) { $result[$item] = 'NULL'; } elseif (is_scalar($val)) { - if ($bindValue) { - // 过滤非标量数据 - $this->query->bind($key, $val, isset($bind[$key]) ? $bind[$key] : PDO::PARAM_STR); - $result[$item] = ':' . $key; - } else { - $result[$item] = $this->parseValue($val); - } + // 过滤非标量数据 + $this->query->bind($key, $val, isset($bind[$key]) ? $bind[$key] : PDO::PARAM_STR); + $result[$item] = ':' . $key; } } }