From de7d3e39e0c15e1f1a1f595816d8bf83e71fa6ae Mon Sep 17 00:00:00 2001 From: thinkphp Date: Fri, 7 Oct 2016 11:47:44 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E8=BF=9Bsqlsrv=E9=A9=B1=E5=8A=A8?= =?UTF-8?q?=E7=B1=BBparseKey=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/db/builder/Sqlsrv.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/think/db/builder/Sqlsrv.php b/library/think/db/builder/Sqlsrv.php index 3ef28f7c..c53f3848 100644 --- a/library/think/db/builder/Sqlsrv.php +++ b/library/think/db/builder/Sqlsrv.php @@ -70,7 +70,7 @@ class Sqlsrv extends Builder protected function parseKey($key, $options = []) { $key = trim($key); - if (strpos($key, '.')) { + if (strpos($key, '.') && !preg_match('/[,\'\"\(\)\[\s]/', $key)) { list($table, $key) = explode('.', $key, 2); if (isset($options['alias'][$table])) { $table = $options['alias'][$table];