2010-07-04, 10:24 PM
One of my MyBB based sites uses a 2nd database, which until now I add into inc/init.php after each upgrade as $db2, eg:
But I know want to do this from a plugin so I don't have to make the modifications after each upgrade.
Which plugin hook if any could I use to create the database connection so that it would then be persistent across all files as it is when I manually add it into inc/init.php ?
Thanks
$db2->connect($config['hostname2'], $config['username2'], $config['password2']);
$db2->select_db($config['database2']);
But I know want to do this from a plugin so I don't have to make the modifications after each upgrade.
Which plugin hook if any could I use to create the database connection so that it would then be persistent across all files as it is when I manually add it into inc/init.php ?
Thanks