Location: PHPKode > scripts > iOracleDriver > OracleRecordsetPHP4.class.php
<?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 {
       //ATRIBUTES
       var $_rsQry;     //It's the statement before realize the query

       //OPERACIONES
       /*
       It is the class constructor
       */
       function OracleRecordset(& $rs) {
         $this->_rsQry = $rs;
       }
       function __destruct() {
         $this->close();
       }
       function fetch() {
         return OCIFetch($this->_rsQry);
       }
       function getResult($n) {
         return OCIResult($this->_rsQry, $n);
       }
       function getNRows() {
         return OCIRowCount($this->_rsQry);
       }
       function getNCols() {
         return OCINumCols($this->_rsQry);
       }
       function close() {
         OCIFreeStatement($this->_rsQry);
         unset($this->_rsQry);
       }
     }  /** End of OracleRecordset */

 }

?>
Return current item: iOracleDriver