Skip to content

Commit c7d704f

Browse files
committed
- added Select::fetchGroups
1 parent 49f248c commit c7d704f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/Kir/MySQL/Builder/RunnableSelect.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,9 @@ public function fetchGroups(array $fields) {
119119
foreach($rows as $row) {
120120
$tmp = &$result;
121121
foreach($fields as $field) {
122-
$tmp[$field] = [];
123-
$tmp = &$tmp[$field];
122+
$value = $row[$field];
123+
$tmp[$value] = [];
124+
$tmp = &$tmp[$value];
124125
}
125126
$tmp = $row;
126127
}

0 commit comments

Comments
 (0)