i want to know how to use 2 db's in single webapi application... i did this
$di->set('db', function () { return new PdoMysql( array( "host" => "localhost", "username" => "root", "password" => "", "dbname" => "db1" ) ); });
$di->set('dbblog', function () { return new PdoMysql( array( "host" => "localhost", "username" => "root", "password" => "", "dbname" => "db2" ) ); });
and in models i do public function initialize() { $this->setSource('wp_posts'); $this->setConnectionService('dbblog'); } but this is not working