From d36903bddc15ec4af4e409b785493e5ae4c92c93 Mon Sep 17 00:00:00 2001 From: thinkphp Date: Mon, 30 May 2016 16:28:53 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E8=BF=9BQuery=E7=B1=BB=E7=9A=84getTab?= =?UTF-8?q?leInfo=E6=96=B9=E6=B3=95=20=E6=94=AF=E6=8C=81=E5=AF=B9=E8=A1=A8?= =?UTF-8?q?=E5=90=8D=E7=9A=84=E7=89=B9=E6=AE=8A=E5=AD=97=E7=AC=A6=E5=AE=9A?= =?UTF-8?q?=E4=B9=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/db/Query.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/library/think/db/Query.php b/library/think/db/Query.php index 78ebc07b..0f542ec8 100644 --- a/library/think/db/Query.php +++ b/library/think/db/Query.php @@ -1202,10 +1202,14 @@ class Query if (is_array($tableName)) { $tableName = key($tableName) ?: current($tableName); } + if (strpos($tableName, ',')) { // 多表不获取字段信息 return false; + } else { + $tableName = $this->connection->parseSqlTable($tableName); } + $guid = md5($tableName); if (!isset($_info[$guid])) { $info = $this->connection->getFields($tableName);