cvs: pear /MDB2/MDB2 Extended.php
| From: | Lukas Smith | Date: | Thu, 27 Oct 2005 16:28:37 +0000 |
| Subject: | cvs: pear /MDB2/MDB2 Extended.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-35903@lists.php.net to get a copy of this message | ||
lsmith Thu Oct 27 12:28:37 2005 EDT
Modified files:
/pear/MDB2/MDB2 Extended.php
Log:
- allow empty field parameter in get*ID() methods (bug #5791)
http://cvs.php.net/diff.php/pear/MDB2/MDB2/Extended.php?r1=1.30&r2=1.31&ty=u
Index: pear/MDB2/MDB2/Extended.php
diff -u pear/MDB2/MDB2/Extended.php:1.30 pear/MDB2/MDB2/Extended.php:1.31
--- pear/MDB2/MDB2/Extended.php:1.30 Wed Oct 5 08:40:26 2005
+++ pear/MDB2/MDB2/Extended.php Thu Oct 27 12:28:36 2005
@@ -42,7 +42,7 @@
// | Author: Lukas Smith <smith@pooteeweet.org> |
// +----------------------------------------------------------------------+
//
-// $Id: Extended.php,v 1.30 2005/10/05 12:40:26 lsmith Exp $
+// $Id: Extended.php,v 1.31 2005/10/27 16:28:36 lsmith Exp $
/**
* @package MDB2
@@ -552,6 +552,7 @@
* does not support auto increment
*
* @param string $table name of the table into which a new row was inserted
+ * @param string $field name of the field into which a new row was inserted
* @param boolean $ondemand when true the seqence is
* automatic created, if it
* not exists
@@ -559,7 +560,7 @@
* @return mixed MDB2 Error Object or id
* @access public
*/
- function getBeforeID($table, $field, $ondemand = true)
+ function getBeforeID($table, $field = null, $ondemand = true)
{
$db =& $this->getDBInstance();
if (PEAR::isError($db)) {
@@ -585,10 +586,11 @@
*
* @param mixed $id value as returned by getBeforeId()
* @param string $table name of the table into which a new row was inserted
+ * @param string $field name of the field into which a new row was inserted
* @return mixed MDB2 Error Object or id
* @access public
*/
- function getAfterID($id, $table, $field)
+ function getAfterID($id, $table, $field = null)
{
$db =& $this->getDBInstance();
if (PEAR::isError($db)) {