Welcome Guest, Not a member yet? Register   Sign In
Turn off "You have specified an invalid database connection group."

How could i do that ?

thanks :-)

The best way might be to specify a valid database connection group. Wink

Read about establishing database connections in CI.

Two basic things to check for in your config/database file:
- is $active_group variable set to a valid array of config variables? Default, perhaps?
- are your database config variables correct - hostname, db name, etc?

Good luck!

Or don't autoload the database?

Thanks for your replies,

i tried to connect to different databases in a controller

so i created a object for each database like this


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

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)
        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


Theme © iAndrew 2016 - Forum software by © MyBB