cvs: pear /MDB2 MDB2.php

From: Date: Sun, 30 Apr 2006 20:22:10 +0000
Subject: cvs: pear /MDB2 MDB2.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-39914@lists.php.net to get a copy of this message
lsmith Sun Apr 30 20:22:10 2006 UTC Modified files: /pear/MDB2 MDB2.php Log: - added row seeking support to fetchOne() http://cvs.php.net/viewcvs.cgi/pear/MDB2/MDB2.php?r1=1.188&r2=1.189&diff_format=u Index: pear/MDB2/MDB2.php diff -u pear/MDB2/MDB2.php:1.188 pear/MDB2/MDB2.php:1.189 --- pear/MDB2/MDB2.php:1.188 Sun Apr 30 19:50:00 2006 +++ pear/MDB2/MDB2.php Sun Apr 30 20:22:10 2006 @@ -43,7 +43,7 @@ // | Author: Lukas Smith <smith@pooteeweet.org> | // +----------------------------------------------------------------------+ // -// $Id: MDB2.php,v 1.188 2006/04/30 19:50:00 lsmith Exp $ +// $Id: MDB2.php,v 1.189 2006/04/30 20:22:10 lsmith Exp $ // /** @@ -2887,8 +2887,8 @@ /** * Fetch and return a row of data * - * @param int $fetchmode how the array data should be indexed - * @param int $rownum number of the row where the data can be found + * @param int $fetchmode how the array data should be indexed + * @param int $rownum number of the row where the data can be found * @return int data array on success, a MDB2 error on failure * @access public */ @@ -2903,16 +2903,17 @@ // {{{ function fetchOne($colnum = 0) /** - * fetch single column from the first row from a result set + * fetch single column from the next row from a result set * * @param int $colnum the column number to fetch + * @param int $rownum number of the row where the data can be found * @return string data on success, a MDB2 error on failure * @access public */ - function fetchOne($colnum = 0) + function fetchOne($colnum = 0, $rownum = null) { $fetchmode = is_numeric($colnum) ? MDB2_FETCHMODE_ORDERED : MDB2_FETCHMODE_ASSOC; - $row = $this->fetchRow($fetchmode); + $row = $this->fetchRow($fetchmode, $rownum); if (!is_array($row) || PEAR::isError($row)) { return $row; }

« previous php.pear.cvs (#39914) next »