restore to working in PHP 5.3

This commit is contained in:
Sergey Tsalkov
2021-06-16 21:46:11 +00:00
parent 1d2ad974f8
commit c0f3a7f31d

View File

@@ -366,15 +366,15 @@ class MeekroDB {
public function columnList($table) { public function columnList($table) {
$data = $this->query("SHOW COLUMNS FROM %b", $table); $data = $this->query("SHOW COLUMNS FROM %b", $table);
$columns = []; $columns = array();
foreach ($data as $row) { foreach ($data as $row) {
$columns[$row['Field']] = [ $columns[$row['Field']] = array(
'type' => $row['Type'], 'type' => $row['Type'],
'null' => $row['Null'], 'null' => $row['Null'],
'key' => $row['Type'], 'key' => $row['Type'],
'default' => $row['Default'], 'default' => $row['Default'],
'extra' => $row['Extra'] 'extra' => $row['Extra']
]; );
} }
return $columns; return $columns;