mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-08 23:52:49 +08:00
改进
This commit is contained in:
@@ -667,10 +667,8 @@ class Query
|
|||||||
if (is_array($join)) {
|
if (is_array($join)) {
|
||||||
if (0 !== $key = key($join)) {
|
if (0 !== $key = key($join)) {
|
||||||
// 设置了键名则键名为表名,键值作为表的别名
|
// 设置了键名则键名为表名,键值作为表的别名
|
||||||
$table = $key;
|
$table = [$key => array_shift($join)];
|
||||||
$alias = array_shift($join);
|
$this->alias($table);
|
||||||
$this->alias([$table => $alias]);
|
|
||||||
$table = [$table => $alias];
|
|
||||||
} else {
|
} else {
|
||||||
$table = array_shift($join);
|
$table = array_shift($join);
|
||||||
}
|
}
|
||||||
@@ -678,8 +676,8 @@ class Query
|
|||||||
$table = trim($join);
|
$table = trim($join);
|
||||||
if (strpos($table, ' ')) {
|
if (strpos($table, ' ')) {
|
||||||
list($table, $alias) = explode(' ', $table);
|
list($table, $alias) = explode(' ', $table);
|
||||||
$this->alias([$table => $alias]);
|
|
||||||
$table = [$table => $alias];
|
$table = [$table => $alias];
|
||||||
|
$this->alias($table);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$this->options['join'][] = [$table, strtoupper($type), $condition];
|
$this->options['join'][] = [$table, strtoupper($type), $condition];
|
||||||
|
|||||||
Reference in New Issue
Block a user