protected function retrieveMapping($table)
    {
        $result = $this->connection->fetchAll(
            'SELECT
               COLUMN_NAME,
               ORDINAL_POSITION
             FROM
               INFORMATION_SCHEMA.COLUMNS
             WHERE TABLE_NAME = ?',
            [$table]
        );

        if (empty($result)) {
            return false;
        }

        $columns = [];

        foreach ($result as $column) {
            $columns[$column['ORDINAL_POSITION']] = $column['COLUMN_NAME'];
        }

        return $columns;
    }
protected function retrieveMapping($table)
    {
        $result = $this->connection->fetchAll(
            'SELECT
               COLUMN_NAME,
               ORDINAL_POSITION
             FROM
               INFORMATION_SCHEMA.COLUMNS
             WHERE TABLE_NAME = ?',
            [$table]
        );

        if (empty($result)) {
            return false;
        }

        $columns = [];

        foreach ($result as $column) {
            $columns[$column['ORDINAL_POSITION']] = $column['COLUMN_NAME'];
        }

        return $columns;
    }
protected function retrieveMapping ( $ table ) { $ result = $ this -> connection -> fetchAll ( 'SELECT
               COLUMN_NAME,
               ORDINAL_POSITION
             FROM
               INFORMATION_SCHEMA.COLUMNS
             WHERE TABLE_NAME = ?' , [ $ table ] ) ; if ( empty ( $ result ) ) { return false ; } $ columns = [ ] ; foreach ( $ result as $ column ) { $ columns [ $ column [ 'ORDINAL_POSITION' ] ] = $ column [ 'COLUMN_NAME' ] ; } return $ columns ; }
Retrieves mapping from database.

@param string $table

@return array|bool
Retrieves mapping from database .