Love Fuel?
Donate
About
Forums
Discussions
Login
FuelPHP Forums
Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
General
How to switch connetion on Db::query
bernhardh
June 2014
For a lot of the DB methods, the second param is the db name (for example Db::list_tables). But how to use another connection then the default for Db::query?
Db::query($query)->set_connection("old")->execute();
Where "old" is the config name of the other connection, doesn't work.
bernhardh
June 2014
Ok, sorry, I just found it:
$query
->execute(
'another_group'
);
Add a Comment
Howdy, Stranger!
It looks like you're new here. If you want to get involved, click one of these buttons!
Sign In
Apply for Membership
Categories
All Discussions
5,089
General
↳ General
3,364
↳ Job Board
13
↳ Installation & Setup
214
Packages
↳ Oil
213
↳ Orm
700
↳ Auth
261
Development
↳ Tips and Tutorials
126
↳ Code share
145
↳ Applications
52
In this Discussion
bernhardh
June 2014