From 7a27dafae405d6bc966f9cef23b39dfb5739e2e1 Mon Sep 17 00:00:00 2001 From: thinkphp Date: Mon, 26 Sep 2016 17:53:16 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3mysql=E7=9A=84json=E7=B1=BB?= =?UTF-8?q?=E5=9E=8B=E5=AD=97=E6=AE=B5=E6=9F=A5=E8=AF=A2?= 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 84853307..04586906 100644 --- a/library/think/db/builder/Mysql.php +++ b/library/think/db/builder/Mysql.php @@ -32,7 +32,7 @@ class Mysql extends Builder if (strpos($key, '$.') && false === strpos($key, '(')) { // JSON字段支持 list($field, $name) = explode('$.', $key); - $key = 'jsn_extract(' . $field . ', \'$.\'.' . $name . ')'; + $key = 'json_extract(' . $field . ', \'$.' . $name . '\')'; } if (!preg_match('/[,\'\"\*\(\)`.\s]/', $key)) { $key = '`' . $key . '`';