Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
connecting to two different DB ( migration)
  • I have setup the Database connection parameters in the config folder as i should, having said that I need a dynamic way to flip between two database connections as I am writing a script to migrate from one to the other ( 2 databases with different table structures)
    thank you for your help
  • Create a second database instance for the second DB, and use that in your queries.
    See http://fuelphp.com/dev-docs/classes/database/usage.html#/running-queries
  • so does this mean that i would have to create a new "database group" in the DB config file with the setting for the second DB?
    PS: i digg the style of the new dev documentation big time! :)
  • Correct. It's the only way to define your database in FuelPHP, you can define as many as you need, the ones in there are just examples that map to the different FuelPHP environments.
  • Thank You ! :)

Howdy, Stranger!

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

In this Discussion