改进Query类join方法对子查询支持

This commit is contained in:
thinkphp
2016-10-10 16:29:47 +08:00
parent f2d44a4775
commit e3466b4383

View File

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