cvs: pear /MDB2 package_ibase.php /MDB2/MDB2/Driver ibase.php

From: Date: Fri, 20 Oct 2006 16:10:19 +0000
Subject: cvs: pear /MDB2 package_ibase.php /MDB2/MDB2/Driver ibase.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-42684@lists.php.net to get a copy of this message
quipo Fri Oct 20 16:10:19 2006 UTC Modified files: /pear/MDB2/MDB2/Driver ibase.php /pear/MDB2 package_ibase.php Log: added lastInsertID() method (not really equivalent to currval(), it's a proxied call to currID) http://cvs.php.net/viewvc.cgi/pear/MDB2/MDB2/Driver/ibase.php?r1=1.194&r2=1.195&diff_format=u Index: pear/MDB2/MDB2/Driver/ibase.php diff -u pear/MDB2/MDB2/Driver/ibase.php:1.194 pear/MDB2/MDB2/Driver/ibase.php:1.195 --- pear/MDB2/MDB2/Driver/ibase.php:1.194 Fri Oct 20 15:55:49 2006 +++ pear/MDB2/MDB2/Driver/ibase.php Fri Oct 20 16:10:19 2006 @@ -43,7 +43,7 @@ // | Author: Lorenzo Alberton <l.alberton@quipo.it> | // +----------------------------------------------------------------------+ // -// $Id: ibase.php,v 1.194 2006/10/20 15:55:49 quipo Exp $ +// $Id: ibase.php,v 1.195 2006/10/20 16:10:19 quipo Exp $ /** * MDB2 FireBird/InterBase driver @@ -923,6 +923,24 @@ } // }}} + // {{{ lastInsertID() + + /** + * Returns the autoincrement ID if supported or $id or fetches the current + * ID in a sequence called: $table.(empty($field) ? '' : '_'.$field) + * + * @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 lastInsertID($table = null, $field = null) + { + $seq = $table.(empty($field) ? '' : '_'.$field); + return $this->currID($seq); + } + + // }}} // {{{ currID() /** http://cvs.php.net/viewvc.cgi/pear/MDB2/package_ibase.php?r1=1.97&r2=1.98&diff_format=u Index: pear/MDB2/package_ibase.php diff -u pear/MDB2/package_ibase.php:1.97 pear/MDB2/package_ibase.php:1.98 --- pear/MDB2/package_ibase.php:1.97 Fri Oct 20 15:55:49 2006 +++ pear/MDB2/package_ibase.php Fri Oct 20 16:10:19 2006 @@ -7,6 +7,7 @@ - added charset and collation support to field declaration - now tableInfo() also returns the table name - fixed bug #9024: typo in currID() error checking +- added lastInsertID() method EOT; $package = new PEAR_PackageFileManager();

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