mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-01 12:42:48 +08:00
改进数据库操作join自身后出错的问题
This commit is contained in:
@@ -183,6 +183,9 @@ abstract class Builder
|
||||
$item = [];
|
||||
foreach ((array) $tables as $key => $table) {
|
||||
if (!is_numeric($key)) {
|
||||
if (strpos($key, '@think')) {
|
||||
$key = strstr($key, '@think', true);
|
||||
}
|
||||
$key = $this->parseSqlTable($key);
|
||||
$item[] = $this->parseKey($key) . ' ' . $this->parseKey($table);
|
||||
} else {
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user