database = $database; $this->handle = $handle; } public function __destruct() { if ($this->handle) { $this->handle->finalize(); } } public function seek($row) { $this->handle->reset(); $i=0; while ($i < $row && $row = @$this->handle->fetchArray()) { $i++; } return true; } /** * @todo This looks terrible but there is no SQLite3::get_num_rows() implementation */ public function numRecords() { $c=0; while ($this->handle->fetchArray()) { $c++; } $this->handle->reset(); return $c; } public function nextRecord() { if ($data = $this->handle->fetchArray(SQLITE3_ASSOC)) { return $data; } else { return false; } } }