Re: [Fwd: Re: [PEAR] DataObject tweak ok with DB and MDB2]

From: Date: Wed, 06 Apr 2005 23:37:33 +0000
Subject: Re: [Fwd: Re: [PEAR] DataObject tweak ok with DB and MDB2]
References: 1 2 3 4  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-18560@lists.php.net to get a copy of this message
Well...I think the thing you think did nothing actually did something. $db_options = PEAR::getStaticProperty($driver,'options'); This gets the options set for the driver. So to set these for DB you do the same kind of thing you're already doing for DB_DO. $config =& PEAR::getStaticProperty('DB', 'options'); $config = array('someOption' => 'someValue', 'etc' => 'etc'); And then you start using DB_DO and it should pull the options for DB. You should be able to do the same for MDB2 as DB_DO will still pull the options. Uncomment that line again and switch to using it unstead of the config array in the DB_DO global.
I dont think it works $db_options =& PEAR::getStaticProperty('DB', 'options'); $db_options = $options; if that worked we could set specific db options in the same config array ! it returned this MDB2 Error: not supported uknown option database, i think it spits an error if u send an array option it doesnt want ! Both DB and MDB do this, so we does the db_options come from then lol ? I think a bested array is best here !

« previous php.pear.general (#18560) next »