Source for file mysql.dbresultset.php

Documentation is available at mysql.dbresultset.php

  1. <?php
  2. /**
  3. @package    jelix
  4. @subpackage db_driver
  5. @author     Croes GĂ©rald, Laurent Jouanneau
  6. @contributor Laurent Jouanneau
  7. @copyright  2001-2005 CopixTeam, 2005-2008 Laurent Jouanneau
  8. *  This class was get originally from the Copix project (CopixDbResultsetMysql, Copix 2.3dev20050901, http://www.copix.org)
  9. *  Few lines of code are still copyrighted 2001-2005 CopixTeam (LGPL licence).
  10. *  Initial authors of this Copix class are Gerald Croes and Laurent Jouanneau,
  11. *  and this class was adapted/improved for Jelix by Laurent Jouanneau
  12. *
  13. @link      http://www.jelix.org
  14. @licence  http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public Licence, see LICENCE file
  15. */
  16.  
  17. /**
  18.  * Couche d'encapsulation des resultset mysql.
  19.  * @package    jelix
  20.  * @subpackage db_driver
  21.  */
  22. class mysqlDbResultSet extends jDbResultSet {
  23.  
  24.     protected function  _fetch ({
  25.         if($this->_fetchMode == jDbConnection::FETCH_CLASS{
  26.             if ($this->_fetchModeCtoArgs)
  27.                 $ret =  mysql_fetch_object ($this->_idResult$this->_fetchModeParam$this->_fetchModeCtoArgs);
  28.             else
  29.                 $ret =  mysql_fetch_object ($this->_idResult$this->_fetchModeParam);
  30.         }else{
  31.             $ret =  mysql_fetch_object ($this->_idResult);
  32.         }
  33.         return $ret;
  34.     }
  35.  
  36.     protected function _free (){
  37.         return mysql_free_result ($this->_idResult);
  38.     }
  39.  
  40.     protected function _rewind (){
  41.         return @mysql_data_seek $this->_idResult0);
  42.     }
  43.  
  44.     public function rowCount(){
  45.         return mysql_num_rows($this->_idResult);
  46.     }
  47.  
  48.     public function bindColumn($column&$param $type=null )
  49.       {throw new jException('jelix~db.error.feature.unsupported'array('mysql','bindColumn'))}
  50.     public function bindParam($parameter&$variable $data_type =null$length=null,  $driver_options=null)
  51.       {throw new jException('jelix~db.error.feature.unsupported'array('mysql','bindParam'))}
  52.     public function bindValue($parameter$value$data_type)
  53.       {throw new jException('jelix~db.error.feature.unsupported'array('mysql','bindValue'))}
  54.     public function columnCount()
  55.       return mysql_num_fields($this->_idResult)}
  56.     public function execute($parameters=null)
  57.       {throw new jException('jelix~db.error.feature.unsupported'array('mysql','bindColumn'))}
  58. }

Documentation generated on Thu, 22 Mar 2012 22:17:54 +0100 by phpDocumentor 1.4.3