改进数据库操作join自身后出错的问题

This commit is contained in:
thinkphp
2016-12-07 07:16:50 +08:00
parent 0788e048a7
commit 4780d194b5
2 changed files with 6 additions and 0 deletions

View File

@@ -716,6 +716,9 @@ class Query
}
}
if (isset($alias)) {
if (isset($this->options['alias'][$table])) {
$table = $table . '@think' . uniqid();
}
$table = [$table => $alias];
$this->alias($table);
}