title: Taking wrong database configuration array
body: <p>I have one application in which i have used 2 database connections. In my database config file i have given two arrays as below.</p>
  
  <p>$active_group = ‘default’;
  $active_record = TRUE;</p>
  
  <p>FIRST ARRAY
  $db[‘default’][‘hostname’] = ‘hostname’;
  ..............
  ..........</p>
  
  <p>SECOND ARRAY
  $db[‘another_db’][‘hostname’] = ‘hostname’;
  ..............
  ..........</p>
  
  <p>this is working fine.</p>
  
  <p>Now, I copied the entire CI folder to develop another application in which only one database connection needed.</p>
  
  <p>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.</p>
  
  <p>“You have specified an invalid database connection group.”</p>
  
  <p>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”.</p>
  
  <p>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”.</p>