Just change the var itself.

$this->ModelName->useDbConfig = 'dbconfigname';

On jún. 17, 14:47, Stu <[email protected]> wrote:
> Hello all,
>
> I know this has been asked a few time, but I feel that what I'm trying
> to do is slightly different.  Here's the idea:  I want to setup an
> element containing a form which would allow the user to select the
> database he wants.  Basically I'm going to have two identical
> databases (Test and Prod).  Now since I'm already using ANOTHER
> database used for other tools on the site, I have: (var $useDbConfig =
> 'db1';) on top of every model that requires it.  I was thinking that
> if it'd be possible to have it look like this:
>
> var $useDbConfig = $current_db;
>
> and have a function somewhere that would simply switch up the string
> when called.
>
> Is this possible?  Any information is greatly appreciated!
>
> Thanks

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to