json字段支持参数错误

explode 参数位置错误
This commit is contained in:
过客
2016-09-09 15:54:42 +08:00
committed by GitHub
parent b9b425d143
commit 0c0da5fd44

View File

@@ -50,7 +50,7 @@ class Pgsql extends Builder
$key = trim($key); $key = trim($key);
if (strpos($key, '$.') && false === strpos($key, '(')) { if (strpos($key, '$.') && false === strpos($key, '(')) {
// JSON字段支持 // JSON字段支持
list($field, $name) = explode($key, '$.'); list($field, $name) = explode('$.', $key);
$key = $field . '->>\'' . $name . '\''; $key = $field . '->>\'' . $name . '\'';
} }
return $key; return $key;