/** * Liste les colonnes d'une table * @param string $tableName * * @return mixed array | null */ public function listColumns($tableName) { try { $sql = "SHOW FIELDS FROM {$tableName}"; $stmt = $this->dbConnection->getConn()->prepare($sql); if ($stmt->execute()) { return $stmt->fetchAll(\PDO::FETCH_NUM); } } catch (\Exception $e) { echo helper::error($e->getMessage() . "\r\n"); return null; } }