public function getTableColumns( $table, array $exclude = [ ] )
    {
        $query = "pragma table_info( $table )";

        $result = $this->query( $query );

        // grab all columns
        $columns = [ ];

        foreach ( $result as $res )
        {
            foreach ( $res as $key => $value )
            {
                if ( 'name' === $key && !in_array( $value, $exclude ) )
                {
                    $null = ' NULL';

                    if ( TRUE === ( bool ) $res[ 'notnull' ] )
                    {
                        $null = ' NOT NULL';
                    }

                    $columns[ $value ] = $res[ 'type' ] . $null;
                }
            }
        }

        return $columns;
    }
public function getTableColumns( $table, array $exclude = [ ] )
    {
        $query = "pragma table_info( $table )";

        $result = $this->query( $query );

        // grab all columns
        $columns = [ ];

        foreach ( $result as $res )
        {
            foreach ( $res as $key => $value )
            {
                if ( 'name' === $key && !in_array( $value, $exclude ) )
                {
                    $null = ' NULL';

                    if ( TRUE === ( bool ) $res[ 'notnull' ] )
                    {
                        $null = ' NOT NULL';
                    }

                    $columns[ $value ] = $res[ 'type' ] . $null;
                }
            }
        }

        return $columns;
    }
public function getTableColumns ( $ table , array $ exclude = [ ] ) { $ query = "pragma table_info( $table )" ; $ result = $ this -> query ( $ query ) ; // grab all columns
 $ columns = [ ] ; foreach ( $ result as $ res ) { foreach ( $ res as $ key => $ value ) { if ( 'name' === $ key && ! in_array ( $ value , $ exclude ) ) { $ null = ' NULL' ; if ( TRUE === ( bool ) $ res [ 'notnull' ] ) { $ null = ' NOT NULL' ; } $ columns [ $ value ] = $ res [ 'type' ] . $ null ; } } } return $ columns ; }
Get a list of table columns.

@param string $table
@param array  $exclude

@return array
Get a list of table columns .