From 5a0664c826b7bef1d11ee54acb96f92689cc5022 Mon Sep 17 00:00:00 2001 From: thinkphp Date: Sun, 3 Apr 2016 20:03:44 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BF=98=E5=8E=9Fmysql=E9=A9=B1=E5=8A=A8?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/db/driver/Mysql.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/think/db/driver/Mysql.php b/library/think/db/driver/Mysql.php index a9891df6..1c48278c 100644 --- a/library/think/db/driver/Mysql.php +++ b/library/think/db/driver/Mysql.php @@ -103,7 +103,7 @@ class Mysql extends Driver list($field, $name) = explode($key, '$.'); $key = 'jsn_extract(' . $field . ', \'$.\'.' . $name . ')'; } - if ($key && !preg_match('/[,\'\"\*\(\)`.\s]/', $key)) { + if (!preg_match('/[,\'\"\*\(\)`.\s]/', $key)) { $key = '`' . $key . '`'; } return $key;