connect to another mysql db

Permalink
Hello guy's

I am trying to use the db::loader to connect to another db with no luck.
Can some one explain to me how to create a second db connection using the new version of concrete?

 
afandino replied on at Permalink Best Answer Reply
Well I answered my own question and will post it here. This may or may not be the best method but it works, and allows my to feed the info to params dynamically.

$config = new \Doctrine\DBAL\Configuration();
$connectionParams = array(
'dbname' => 'DBname',
'user' => 'DBuser',
'password' => 'DBpass',
'host' => 'DBhost',
'driver' => 'pdo_mysql',);
$db = \Doctrine\DBAL\DriverManager::getConnection($connectionParams, $config);

this created the connection now just feed it your queries, just make sure to follow dbal methods.