mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-09-02 13:31:38 +08:00
改进table方法的解析
This commit is contained in:
@@ -1049,6 +1049,17 @@ class Query
|
||||
list($table, $alias) = explode(' ', $table);
|
||||
$this->alias([$table => $alias]);
|
||||
}
|
||||
} else {
|
||||
$tables = $table;
|
||||
$table = [];
|
||||
foreach ($tables as $key => $val) {
|
||||
if (is_numeric($key)) {
|
||||
$table[] = $val;
|
||||
} else {
|
||||
$this->alias([$key => $val]);
|
||||
$table[] = $key;
|
||||
}
|
||||
}
|
||||
}
|
||||
$this->options['table'] = $table;
|
||||
return $this;
|
||||
|
||||
Reference in New Issue
Block a user