How to use a different (second) database in CakePHP
/app/config/database.php code:
var $connectionName = array( 'driver' => 'mysql' , 'persistent' => false , 'host' => 'localhost' , 'login' => 'your-username' , 'password' => 'your-password' , 'database' => 'your-database' , 'prefix' => '' );
In a random model:
$this->useDbConfig = 'connectionName';
