ADODB_postgres64(); } // the following should be compat with postgresql 7.2, // which makes obsolete the LIMIT limit,offset syntax function &SelectLimit($sql,$nrows=-1,$offset=-1,$inputarr=false,$arg3=false,$secs2cache=0) { $offsetStr = ($offset >= 0) ? " OFFSET $offset" : ''; $limitStr = ($nrows >= 0) ? " LIMIT $nrows" : ''; return $secs2cache ? $this->CacheExecute($secs2cache,$sql."$limitStr$offsetStr",$inputarr,$arg3) : $this->Execute($sql."$limitStr$offsetStr",$inputarr,$arg3); } } /*-------------------------------------------------------------------------------------- Class Name: Recordset --------------------------------------------------------------------------------------*/ class ADORecordSet_postgres7 extends ADORecordSet_postgres64{ var $databaseType = "postgres7"; function ADORecordSet_postgres7($queryID,$mode=false) { $this->ADORecordSet_postgres64($queryID,$mode); } // 10% speedup to move MoveNext to child class function MoveNext() { if (!$this->EOF) { $this->_currentRow++; if ($this->_numOfRows < 0 || $this->_numOfRows > $this->_currentRow) { $this->fields = @pg_fetch_array($this->_queryID,$this->_currentRow,$this->fetchMode); if (is_array($this->fields)) { if (isset($this->_blobArr)) $this->_fixblobs(); return true; } } $this->fields = false; $this->EOF = true; } return false; } } ?>