diff --git a/library/think/db/Query.php b/library/think/db/Query.php index 1135a3d2..9f43f25a 100644 --- a/library/think/db/Query.php +++ b/library/think/db/Query.php @@ -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;