From e3466b43833e5afaa94f40c3907027d2c6d51f75 Mon Sep 17 00:00:00 2001 From: thinkphp Date: Mon, 10 Oct 2016 16:29:47 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E8=BF=9BQuery=E7=B1=BBjoin=E6=96=B9?= =?UTF-8?q?=E6=B3=95=E5=AF=B9=E5=AD=90=E6=9F=A5=E8=AF=A2=E6=94=AF=E6=8C=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/db/Query.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/think/db/Query.php b/library/think/db/Query.php index 3ca3382d..79ad05ba 100644 --- a/library/think/db/Query.php +++ b/library/think/db/Query.php @@ -674,7 +674,7 @@ class Query } } else { $table = trim($join); - if (strpos($table, ' ')) { + if (strpos($table, ' ') && !strpos($table, ')')) { list($table, $alias) = explode(' ', $table); $table = [$table => $alias]; $this->alias($table);