From 63a3936eb9c5fae773a97db31a338f1f7ad18b41 Mon Sep 17 00:00:00 2001 From: thinkphp Date: Fri, 9 Dec 2016 19:18:35 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E8=BF=9BQuery=E7=B1=BBtable=E6=96=B9?= =?UTF-8?q?=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/db/Query.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/library/think/db/Query.php b/library/think/db/Query.php index eb14638a..dc854a6c 100644 --- a/library/think/db/Query.php +++ b/library/think/db/Query.php @@ -1111,7 +1111,6 @@ class Query if (is_string($table)) { if (strpos($table, ')')) { // 子查询 - $table = $table; } elseif (strpos($table, ',')) { $tables = explode(',', $table); $table = []; @@ -1126,7 +1125,8 @@ class Query } } elseif (strpos($table, ' ')) { list($table, $alias) = explode(' ', $table); - $table = [$table => $alias]; + + $table = [$table => $alias]; $this->alias($table); } } else {