cvs: pear /DB_DataObject DataObject.php

From: Date: Wed, 20 Apr 2005 07:39:23 +0000
Subject: cvs: pear /DB_DataObject DataObject.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-31309@lists.php.net to get a copy of this message
alan_k Wed Apr 20 03:39:23 2005 EDT Modified files: /pear/DB_DataObject DataObject.php Log: fix bug #3944 - support for informix autoincrements http://cvs.php.net/diff.php/pear/DB_DataObject/DataObject.php?r1=1.349&r2=1.350&ty=u Index: pear/DB_DataObject/DataObject.php diff -u pear/DB_DataObject/DataObject.php:1.349 pear/DB_DataObject/DataObject.php:1.350 --- pear/DB_DataObject/DataObject.php:1.349 Wed Apr 13 04:37:32 2005 +++ pear/DB_DataObject/DataObject.php Wed Apr 20 03:39:22 2005 @@ -15,7 +15,7 @@ * @author Alan Knowles <alan@akbkhome.com> * @copyright 1997-2005 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: DataObject.php,v 1.349 2005/04/13 08:37:32 alan_k Exp $ + * @version CVS: $Id: DataObject.php,v 1.350 2005/04/20 07:39:22 alan_k Exp $ * @link http://pear.php.net/package/DB_DataObject */ @@ -1029,13 +1029,27 @@ if (!$seq) { $seq = $DB->getSequenceName($this->__table ); } - $pgsql_key = $DB->getOne("SELECT last_value FROM ".$seq); + $pgsql_key = $DB->getOne("SELECT last_value FROM ".$seq); if (PEAR::isError($pgsql_key)) { $this->raiseError($r); return false; } $this->$key = $pgsql_key; - break; + break; + + case 'ifx': + $this->$key = array_shift ( + ifx_fetch_row ( + ifx_query( + "select DBINFO('sqlca.sqlerrd1') FROM systables where tabid=1", + $_DB_DATAOBJECT['CONNECTIONS'][$this->_database_dsn_md5]->connection, + IFX_SCROLL + ), + "FIRST" + ) + ); + break; + } } @@ -1944,7 +1958,7 @@ // technically postgres native here... // we need to get the new improved tabledata sorted out first. - if ( in_array($dbtype , array( 'mysql', 'mysqli', 'mssql')) && + if ( in_array($dbtype , array( 'mysql', 'mysqli', 'mssql', 'ifx')) && ($table[$usekey] & DB_DATAOBJECT_INT) && isset($realkeys[$usekey]) && ($realkeys[$usekey] == 'N') ) {

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