function GetFields($table)
    {
        $fields = array();
        $sql = new Sql\Builder($this);
        $tbl = $sql->Table('information_schema.columns', array('TABLE_SCHEMA', 'TABLE_NAME', 'COLUMN_NAME'));
        $cond = $sql->Equals($tbl->Field('TABLE_SCHEMA'), $sql->Value($this->dbName))
                ->And_($sql->Equals($tbl->Field('TABLE_NAME'), $sql->Value($table)));
        $what = $sql->SelectList($tbl->Field('COLUMN_NAME'));
        $select = $sql->Select(true, $what, $tbl, $cond);
        $reader = $this->ExecuteQuery((string) $select);
        while ($reader->Read())
        {
            $fields[] = $reader->ByIndex(0);
        }
        return $fields;
    }
function GetFields($table)
    {
        $fields = array();
        $sql = new Sql\Builder($this);
        $tbl = $sql->Table('information_schema.columns', array('TABLE_SCHEMA', 'TABLE_NAME', 'COLUMN_NAME'));
        $cond = $sql->Equals($tbl->Field('TABLE_SCHEMA'), $sql->Value($this->dbName))
                ->And_($sql->Equals($tbl->Field('TABLE_NAME'), $sql->Value($table)));
        $what = $sql->SelectList($tbl->Field('COLUMN_NAME'));
        $select = $sql->Select(true, $what, $tbl, $cond);
        $reader = $this->ExecuteQuery((string) $select);
        while ($reader->Read())
        {
            $fields[] = $reader->ByIndex(0);
        }
        return $fields;
    }
function GetFields ( $ table ) { $ fields = array ( ) ; $ sql = new Sql \ Builder ( $ this ) ; $ tbl = $ sql -> Table ( 'information_schema.columns' , array ( 'TABLE_SCHEMA' , 'TABLE_NAME' , 'COLUMN_NAME' ) ) ; $ cond = $ sql -> Equals ( $ tbl -> Field ( 'TABLE_SCHEMA' ) , $ sql -> Value ( $ this -> dbName ) ) -> And_ ( $ sql -> Equals ( $ tbl -> Field ( 'TABLE_NAME' ) , $ sql -> Value ( $ table ) ) ) ; $ what = $ sql -> SelectList ( $ tbl -> Field ( 'COLUMN_NAME' ) ) ; $ select = $ sql -> Select ( true , $ what , $ tbl , $ cond ) ; $ reader = $ this -> ExecuteQuery ( ( string ) $ select ) ; while ( $ reader -> Read ( ) ) { $ fields [ ] = $ reader -> ByIndex ( 0 ) ; } return $ fields ; }
Gets all fields in a table
@param string $table The table name
@return string[] Returns the field (column) names for the table
Gets all fields in a table