On Tue, Feb 2, 2010 at 12:51 PM, Miles J <mileswjohnson@gmail.com> wrote:
Why aren't you just placing the config in database.php?
Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.
On Feb 2, 8:48 am, bryan de asis <bryandea...@gmail.com> wrote:
> Hello,
>
> Has anyone here tried to create a plugin which connects to a
> difference database dynamically?
> My Plugin name is "News"
> I have tried adding this lines on beforeFilter on my
> ArticlesController:
> $db =& ConnectionManager::getDataSource('default');
> $db->disconnect();
> $db->config['host'] = 'localhost';
> $db->config['login'] = 'login';
> $db->config['password'] = 'password';
> $db->config['database'] = 'database_name';
> $db->connect();
> and it doesn't work... it still doesnt work.
>
> anyone have any idea...
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
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
No comments:
Post a Comment