clear_counts(); } //clear counts function clear_counts() { $this -> currentFieldnum = 0; $this -> currentRownum = 0; } //get fieldnames function getfieldname() { if ($this -> currentFieldnum >= $this -> colcount) { $this -> currentFieldnum = 0; return false; } else { //$s = pg_fieldname($this -> queryresult,$this -> currentFieldnum); // - PHP4.2.0 $s = pg_field_name($this -> queryresult,$this -> currentFieldnum); // PHP4.2.0 - ++$this -> currentFieldnum; return $s; }; } //get rows function getrow() { if ($this -> currentRownum >= $this -> rowcount) { $this -> currentRownum = 0; return false; } else { $s = pg_fetch_row($this -> queryresult, $this -> currentRownum); ++$this -> currentRownum; return $s; }; } } ?>