cvs: pear /MDB pear_wrapper.php

From: Date: Wed, 10 Jul 2002 10:58:06 +0000
Subject: cvs: pear /MDB pear_wrapper.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-5008@lists.php.net to get a copy of this message
lsmith Wed Jul 10 06:58:06 2002 EDT Modified files: /pear/MDB pear_wrapper.php Log: options are now stored similar to PEAR DB in an array and not in seperate class vars sequence values are now stored in a var that is passed by reference removed DB_Warning fixed typo in the method factory Index: pear/MDB/pear_wrapper.php diff -u pear/MDB/pear_wrapper.php:1.12 pear/MDB/pear_wrapper.php:1.13 --- pear/MDB/pear_wrapper.php:1.12 Thu Jul 4 15:14:31 2002 +++ pear/MDB/pear_wrapper.php Wed Jul 10 06:58:06 2002 @@ -42,7 +42,7 @@ // | Author: Lukas Smith <smith@dybnet.de> | // +----------------------------------------------------------------------+ // -// $Id: pear_wrapper.php,v 1.12 2002/07/04 19:14:31 lsmith Exp $ +// $Id: pear_wrapper.php,v 1.13 2002/07/10 10:58:06 lsmith Exp $ // // PEAR DB Wrapper for MDB. // @@ -59,7 +59,7 @@ function &connect($dsn, $options = FALSE) { if (!is_array($options) && $options) { - $$options["persistent"] = TRUE; + $options["persistent"] = TRUE; } $db = MDB::connect($dsn, $options); if(PEAR::isError($db)) @@ -119,19 +119,6 @@ } } -class DB_Warning extends PEAR_Error -{ - function DB_Warning($code = DB_WARNING, $mode = PEAR_ERROR_RETURN, - $level = E_USER_NOTICE, $debuginfo = NULL) - { - if (is_int($code)) { - $this->PEAR_Error('DB Warning: ' . DB::errorMessage($code), $code, $mode, $level, $debuginfo); - } else { - $this->PEAR_Error("DB Warning: $code", 0, $mode, $level, $debuginfo); - } - } -} - class DB_result { var $dbh; @@ -394,7 +381,11 @@ function nextId($seq_name, $ondemand = TRUE) { - return $this->MDB_object->nextId($seq_name, $ondemand); + $return = $this->MDB_object->nextId($seq_name, $value, $ondemand); + if(MDB::isError($return)) { + return $return; + } + return $value; } function createSequence($seq_name)

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