From 0c0da5fd44e069b5e95928102c3251a063e09dd5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=BF=87=E5=AE=A2?= <9714928@qq.com> Date: Fri, 9 Sep 2016 15:54:42 +0800 Subject: [PATCH] =?UTF-8?q?json=E5=AD=97=E6=AE=B5=E6=94=AF=E6=8C=81?= =?UTF-8?q?=E5=8F=82=E6=95=B0=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit explode 参数位置错误 --- library/think/db/builder/Pgsql.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/think/db/builder/Pgsql.php b/library/think/db/builder/Pgsql.php index 6f256e0e..0a955a5b 100644 --- a/library/think/db/builder/Pgsql.php +++ b/library/think/db/builder/Pgsql.php @@ -50,7 +50,7 @@ class Pgsql extends Builder $key = trim($key); if (strpos($key, '$.') && false === strpos($key, '(')) { // JSON字段支持 - list($field, $name) = explode($key, '$.'); + list($field, $name) = explode('$.', $key); $key = $field . '->>\'' . $name . '\''; } return $key;