Consider use iid if exists as row index

pull/4061/head
Angel Fernando Quiroz Campos 4 years ago committed by GitHub
parent 8f84d34f08
commit 0167f1be49
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      main/inc/lib/database.lib.php

@ -620,7 +620,9 @@ class Database
$array = [];
if ($type_result === 'all') {
while ($row = self::fetch_array($result, $option)) {
if (isset($row['id'])) {
if (isset($row['iid'])) {
$array[$row['iid']] = $row;
} elseif (isset($row['id'])) {
$array[$row['id']] = $row;
} else {
$array[] = $row;

Loading…
Cancel
Save