From 427bf4b2df3e355911d6749bea05d624fc89ad71 Mon Sep 17 00:00:00 2001 From: thinkphp Date: Thu, 12 Apr 2018 16:52:16 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E8=BF=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/db/Query.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/library/think/db/Query.php b/library/think/db/Query.php index 5b1c9003..327d2b4c 100644 --- a/library/think/db/Query.php +++ b/library/think/db/Query.php @@ -775,6 +775,9 @@ class Query } if (is_string($field)) { + if (preg_match('/[\<\'\"\(]/', $field)) { + return $this->fieldRaw($field); + } $field = array_map('trim', explode(',', $field)); } if (true === $field) {