public function getTableColumns($tableName)
    {
        $db = $this->getDb();

        $allColumns = $db->fetchAll("SHOW COLUMNS FROM " . $tableName);

        $fields = array();
        foreach ($allColumns as $column) {
            $fields[trim($column['Field'])] = $column;
        }

        return $fields;
    }
public function getTableColumns($tableName)
    {
        $db = $this->getDb();

        $allColumns = $db->fetchAll("SHOW COLUMNS FROM " . $tableName);

        $fields = array();
        foreach ($allColumns as $column) {
            $fields[trim($column['Field'])] = $column;
        }

        return $fields;
    }
public function getTableColumns ( $ tableName ) { $ db = $ this -> getDb ( ) ; $ allColumns = $ db -> fetchAll ( "SHOW COLUMNS FROM " . $ tableName ) ; $ fields = array ( ) ; foreach ( $ allColumns as $ column ) { $ fields [ trim ( $ column [ 'Field' ] ) ] = $ column ; } return $ fields ; }
Get list of installed columns in a table

@param  string $tableName The name of a table.

@return array  Installed columns indexed by the column name.
Get list of installed columns in a table