PMA\libraries\DatabaseInterface::getColumnNames PHP Méthode

getColumnNames() public méthode

Returns all column names in given table
public getColumnNames ( string $database, string $table, mixed $link = null ) : null | array
$database string name of database
$table string name of table to retrieve columns from
$link mixed mysql link resource
Résultat null | array
    public function getColumnNames($database, $table, $link = null)
    {
        $sql = $this->getColumnsSql($database, $table);
        // We only need the 'Field' column which contains the table's column names
        $fields = array_keys($this->fetchResult($sql, 'Field', null, $link));
        if (!is_array($fields) || count($fields) == 0) {
            return null;
        }
        return $fields;
    }