<?php
/**
* support/OracleRecordset.class.php
* @author Emmanuel Arana Corzo <hide@address.com>
* @version 0.1.1
* @documentation This is a class to catch the realized query
* with the database with the driver
*/
if(!defined("__SUPPORT_ORACLERECORDSET_CLASS__")) {
define("__SUPPORT_ORACLERECORDSET_CLASS__", 0x010102);
/*
+--------------------------------------+
| support |
+--------------------------------------+---------------------------------+
| |
| +---------------------------------------------------+ |
| | OracleRecordset | |
| +---------------------------------------------------+ |
| | - rsQry : Object | |
| +---------------------------------------------------+ |
| | + <<create>>__construct(rs : Object) : void | |
| | + <<destroy>>__destruct():void | |
| | + fetch():bool | |
| | + getResult(n:long):String | |
| | + getNRows():long | |
| | + getNCols():int | |
| | + close():void | |
| +---------------------------------------------------+ |
+------------------------------------------------------------------------+
*/
class OracleRecordset {
//ATRIBUTOS
private $rsQry; //It's the statement before realize the query
//OPERACIONES
/*
It is the class constructor
*/
public function __construct(& $rs) {
$this->rsQry = $rs;
}
public function __destruct() {
$this->close();
}
public function fetch() {
return oci_fetch($this->rsQry);
}
public function getResult($n) {
return oci_result($this->rsQry, $n);
}
public function getNRows() {
return oci_num_rows($this->rsQry);
}
public function getNCols() {
return oci_num_fields($this->rsQry);
}
public function close() {
oci_free_statement($this->rsQry);
unset($this->rsQry);
}
} /** End of OracleRecordset */
}
?>