Hi,
I have one application in which i have used 2 database connections. In my database config file i have given two arrays as below.
$active_group = ‘default’; $active_record = TRUE;
FIRST ARRAY $db[‘default’][‘hostname’] = ‘hostname’; .............. ..........
SECOND ARRAY $db[‘another_db’][‘hostname’] = ‘hostname’; .............. ..........
this is working fine.
Now, I copied the entire CI folder to develop another application in which only one database connection needed.
So, now, in the database config file, i deleted the second configuration array. But, the db class is taking first application’s second array i.e. “another_db” and it is giving the below error.
“You have specified an invalid database connection group.”
When i change the default (only one) array name to “another_db” in configuration file. It is working fine. Can’t understand from where it is taking the group name as “another_db”.
My application autoloads database library. I have debugged the ci_auto_loader in Loader.php class where it calls $this->database() function with no parameters. But in function database($params, $, $) {}, if I echo $params it shows “another_db”.