Вроде как бы сделан вывод объектного ofetch().

This commit is contained in:
lopar 2021-02-01 01:43:48 +02:00
parent 6a96c7de3c
commit 03cb5c0c29
1 changed files with 2 additions and 2 deletions

View File

@ -133,9 +133,9 @@ class DBPDO
// Allows the user to retrieve results using a // Allows the user to retrieve results using a
// column from the results as a key for the array // column from the results as a key for the array
if ($key != null && $results[0][$key]) { if ($key != null && $results[0][$key]) {
$keyed_results = array(); $keyed_results = (object) array();
foreach ($results as $result) { foreach ($results as $result) {
$keyed_results[$result[$key]] = $result; $keyed_results->$result[$key] = $result;
} }
$results = $keyed_results; $results = $keyed_results;
} }