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);