Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
How to switch connetion on Db::query
  • 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.


  • Ok, sorry, I just found it:

    $query->execute('another_group');

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion