修正Mysql builder驱动

This commit is contained in:
thinkphp
2016-07-06 11:56:10 +08:00
parent 8dcb724ec3
commit 0622729b72
2 changed files with 3 additions and 3 deletions

View File

@@ -31,7 +31,7 @@ class Mysql extends Builder
$key = trim($key);
if (strpos($key, '$.') && false === strpos($key, '(')) {
// JSON字段支持
list($field, $name) = explode($key, '$.');
list($field, $name) = explode('$.', $key);
$key = 'jsn_extract(' . $field . ', \'$.\'.' . $name . ')';
}
if (!preg_match('/[,\'\"\*\(\)`.\s]/', $key)) {