Open birgitberlin opened 3 years ago
file: tt_news/Classes/Database/Database.php line 41: $fields['Field'] = $column['Field']; // returns the last column "slug"
public function admin_get_fields($tableName) { $columns = $this->getConnection($tableName)->executeQuery('SHOW COLUMNS FROM ' . $tableName)->fetchAll(); $fields = []; if (is_array($columns)) { foreach ($columns as $column) { //$fields['Field'] = $column['Field']; // returns the last columns "slug" $fields[] = $column['Field']; } } return $fields; }
file: tt_news/Classes/Database/Database.php line 41: $fields['Field'] = $column['Field']; // returns the last column "slug"
public function admin_get_fields($tableName) { $columns = $this->getConnection($tableName)->executeQuery('SHOW COLUMNS FROM ' . $tableName)->fetchAll(); $fields = []; if (is_array($columns)) { foreach ($columns as $column) { //$fields['Field'] = $column['Field']; // returns the last columns "slug" $fields[] = $column['Field']; } } return $fields; }