cvs: pear /MDB_QueryTool/QueryTool Query.php

From: Date: Thu, 15 Jun 2006 17:04:42 +0000
Subject: cvs: pear /MDB_QueryTool/QueryTool Query.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-40722@lists.php.net to get a copy of this message
quipo Thu Jun 15 17:04:42 2006 UTC Modified files: /pear/MDB_QueryTool/QueryTool Query.php Log: fixed bug #7909: different names for nextId()/nextID() in MDB and MDB2 http://cvs.php.net/viewcvs.cgi/pear/MDB_QueryTool/QueryTool/Query.php?r1=1.55&r2=1.56&diff_format=u Index: pear/MDB_QueryTool/QueryTool/Query.php diff -u pear/MDB_QueryTool/QueryTool/Query.php:1.55 pear/MDB_QueryTool/QueryTool/Query.php:1.56 --- pear/MDB_QueryTool/QueryTool/Query.php:1.55 Mon May 15 21:10:30 2006 +++ pear/MDB_QueryTool/QueryTool/Query.php Thu Jun 15 17:04:42 2006 @@ -32,7 +32,7 @@ * @author Lorenzo Alberton <l dot alberton at quipo dot it> * @copyright 2004-2006 Lorenzo Alberton * @license http://www.debian.org/misc/bsd.license BSD License (3 Clause) - * @version CVS: $Id: Query.php,v 1.55 2006/05/15 21:10:30 quipo Exp $ + * @version CVS: $Id: Query.php,v 1.56 2006/06/15 17:04:42 quipo Exp $ * @link http://pear.php.net/package/MDB_QueryTool */ @@ -701,7 +701,8 @@ if ($this->primaryCol) { // do only use the sequence if a primary column is given // otherwise the data are written as given - $id = (int)$this->db->nextId($this->sequenceName); + $func = ($this->_MDBversion == 2) ? 'nextID' : 'nextId'; + $id = (int)$this->db->$func($this->sequenceName); $newData[$this->primaryCol] = $id; } else { // if no primary col is given return true on success @@ -752,7 +753,8 @@ if ($this->primaryCol) { // do only use the sequence if a primary column is given // otherwise the data are written as given - $retIds[] = $id = (int)$this->db->nextId($this->sequenceName); + $func = ($this->_MDBversion == 2) ? 'nextID' : 'nextId'; + $retIds[] = $id = (int)$this->db->$func($this->sequenceName); $aData[$this->primaryCol] = $id; } } else {

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