diff --git a/library/think/db/driver/Mysql.php b/library/think/db/driver/Mysql.php index a9891df6..1c48278c 100644 --- a/library/think/db/driver/Mysql.php +++ b/library/think/db/driver/Mysql.php @@ -103,7 +103,7 @@ class Mysql extends Driver list($field, $name) = explode($key, '$.'); $key = 'jsn_extract(' . $field . ', \'$.\'.' . $name . ')'; } - if ($key && !preg_match('/[,\'\"\*\(\)`.\s]/', $key)) { + if (!preg_match('/[,\'\"\*\(\)`.\s]/', $key)) { $key = '`' . $key . '`'; } return $key;