[eluser]huzzel[/eluser]
Thanks for your replies,
i tried to connect to different databases in a controller
so i created a object for each database like this
$this->active_db_1
$this->active_db_2
$this->active_db_3
If one of the database server goes offline the script dies...
Maybe i have to check first db_connect() before i load each active_db
well the problem is here
Code:
function &DB;($params = '', $active_record_override = FALSE)
{
// Load the DB config file if a DSN string wasn't passed
if (is_string($params) AND strpos($params, '://') === FALSE)
{
include(APPPATH.'config/database'.EXT);
if ( ! isset($db) OR count($db) == 0)
{
show_error('No database connection settings were found in the database config file.');
}
if ($params != '')
{
$active_group = $params;
}
if ( ! isset($active_group) OR ! isset($db[$active_group]))
{
show_error('You have specified an invalid database connection group.');
}
$params = $db[$active_group];
}
So i hav to patch the controller DB.
I created a helper to solute this
thanks