From 14f4302156592146a5ee02ab89d8ec049262c0d1 Mon Sep 17 00:00:00 2001 From: thinkphp Date: Fri, 7 Oct 2016 11:43:08 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E8=BF=9BparseKey=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/db/builder/Mysql.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/think/db/builder/Mysql.php b/library/think/db/builder/Mysql.php index 7744be9a..a3e223ed 100644 --- a/library/think/db/builder/Mysql.php +++ b/library/think/db/builder/Mysql.php @@ -34,7 +34,7 @@ class Mysql extends Builder // JSON字段支持 list($field, $name) = explode('$.', $key); $key = 'json_extract(' . $field . ', \'$.' . $name . '\')'; - } elseif (strpos($key, '.')) { + } elseif (strpos($key, '.') && !preg_match('/[,\'\"\(\)`\s]/', $key)) { list($table, $key) = explode('.', $key, 2); if (isset($options['alias'][$table])) { $table = $options['alias'][$table];