Re: [Fwd: Re: [PEAR] DataObject tweak ok with DB and MDB2]
| From: | Justin Patrin | Date: | Wed, 06 Apr 2005 23:47:39 +0000 |
| Subject: | Re: [Fwd: Re: [PEAR] DataObject tweak ok with DB and MDB2] | ||
| References: | 1 2 3 4 5 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-18561@lists.php.net to get a copy of this message | ||
On Apr 6, 2005 4:37 PM, Dan Rossi <pear@electroteque.org> wrote:
> >>>>>
> >>>
> >>> 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;
>
Well, this is the way that DB_DO works. You're doing the above in your
*calling* script before you use DB_DO, right?
> 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 !
>
Well, perhaps you're setting up the array wrong. This should work I think...
--
Justin Patrin