cvs: pear /MDB2 MDB2.php

From: Date: Fri, 10 Sep 2004 11:25:20 +0000
Subject: cvs: pear /MDB2 MDB2.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-23783@lists.php.net to get a copy of this message
lsmith Fri Sep 10 07:25:20 2004 EDT Modified files: /pear/MDB2 MDB2.php Log: - phpdoc fixes in getAfterID() - getBeforeID() now returns php null and not the string 'NULL' if autoincrement is supported (I am not sure if I am going to regret this, but it seems more inline with people using the datatype abstraction) http://cvs.php.net/diff.php/pear/MDB2/MDB2.php?r1=1.42&r2=1.43&ty=u Index: pear/MDB2/MDB2.php diff -u pear/MDB2/MDB2.php:1.42 pear/MDB2/MDB2.php:1.43 --- pear/MDB2/MDB2.php:1.42 Fri Sep 10 03:17:42 2004 +++ pear/MDB2/MDB2.php Fri Sep 10 07:25:18 2004 @@ -43,7 +43,7 @@ // | Author: Lukas Smith <smith@backendmedia.com> | // +----------------------------------------------------------------------+ // -// $Id: MDB2.php,v 1.42 2004/09/10 07:17:42 lsmith Exp $ +// $Id: MDB2.php,v 1.43 2004/09/10 11:25:18 lsmith Exp $ // /** @@ -2068,8 +2068,7 @@ * returns the next free id of a sequence if the RDBMS * does not support auto increment * - * @param string $seq_name name of the sequence (needs to match the name of - * the table into which a new row was inserted + * @param string $table name of the table into which a new row was inserted * @param boolean $ondemand when true the seqence is * automatic created, if it * not exists @@ -2077,12 +2076,12 @@ * @return mixed MDB2 Error Object or id * @access public */ - function getBeforeID($seq_name, $ondemand = true) + function getBeforeID($table, $ondemand = true) { if (!$this->supported['auto_increment']) { - return $thid->nextID($seq_name, $ondemand); + return $thid->nextID($table, $ondemand); } - return 'NULL'; + return null; } // }}} @@ -2108,15 +2107,14 @@ // {{{ getAfterID() /** - * returns the autoincrement ID if supported + * returns the autoincrement ID if supported or $id * - * @param mixed id value as returned by getBeforeId() - * @param string $seq_name name of the sequence (needs to match the name of - * the table into which a new row was inserted + * @param mixed $id value as returned by getBeforeId() + * @param string $table name of the table into which a new row was inserted * @return mixed MDB2 Error Object or id * @access public */ - function getAfterID($id, $seq_name) + function getAfterID($id, $table) { return $id; }

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