mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-01 12:42:48 +08:00
改进Query类的column方法
This commit is contained in:
@@ -469,6 +469,9 @@ class Query
|
||||
$key1 = array_shift($fields);
|
||||
$key2 = $fields ? array_shift($fields) : '';
|
||||
$key = $key ?: $key1;
|
||||
if (strpos($key, '.')) {
|
||||
list($alias, $key) = explode('.', $key);
|
||||
}
|
||||
foreach ($resultSet as $val) {
|
||||
if ($count > 2) {
|
||||
$result[$val[$key]] = $val;
|
||||
|
||||
Reference in New Issue
Block a user