This is a trick you can use in your IP.Board code, and it also can come in handy for IP.Content as well; it was working with a client on their IP.Content page that I found this code.
The IP.Board database object (usually the $this->DB object in the IP.Board code) is set up by default to connect to the database that has its info defined in your conf_global.php file. You can use the IP.Board framework to quickly create a secondary database connection that has access to all of the same functions. This comes in very handy if you ever need to connect to a database external to your IP.Board install to pull in info from it.
Here's the basic code for it:
/* Set up our alternate database object */ ips_DBRegistry::setDB( 'mysql', 'db2', array( 'sql_database' => '***', 'sql_user' => '***', 'sql_pass' => '***', 'sql_host' => '***', 'sql_charset' => '***', 'sql_tbl_prefix' => '***' ) ); $DB2 = $this->registry->DB( 'db2' );