Friday, October 15, 2010

Re: Is there an easy way to tell CakePHP to use another db setting instead of $default?

You can do that by setting the dbconfig in a specific model that needs
another db using the var $useDbConfig

See for more info http://book.cakephp.org/view/310/Configuration

Or here is an article about changing database configuration on the
fly:
http://insanityville.com/2010/04/how-to-switch-between-databases-in-cakephp-on-the-fly/

Hope this helps!

Kana

On Oct 15, 9:49 am, psybear83 <psybea...@gmail.com> wrote:
> Hi everybody
>
> Is there an easy way to tell CakePHP to use another db setting instead
> of $default? Maybe something like
>
> Configure::write('please.let.me.use.this.database', 'test');
>
> Thanks a lot
> Josh

Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.

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

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate