currentRownum=0; } //execute(override) function execute($str_query){ $this->currentRownum=0; return pgsql_base::execute($str_query); } //get fieldnames function fields(){ for($i=0;$i<$this->colcount;$i++){ $s[] = pg_field_name($this->queryresult,$i); } return $s; } //get rows function row($_num=""){ if($_num!=="") $this->currentRownum=$_num; if ($this->currentRownum >= $this->rowcount) { $this -> currentRownum = 0; return false; } else { $s = pg_fetch_row($this->queryresult, $this->currentRownum); ++$this->currentRownum; return $s; } } //get assoc function assoc($_num=""){ if($_num!=="") $this->currentRownum=$_num; if ($this->currentRownum >= $this->rowcount) { $this -> currentRownum = 0; return false; } else { //$s = pg_fetch_array($this->queryresult, $this->currentRownum, PGSQL_ASSOC); //-PHP4.2.x $s = pg_fetch_assoc($this->queryresult, $this->currentRownum); //PHP4.3.0- ++$this->currentRownum; return $s; } } } ?>