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