title: How to configure multiple database and using failover in Codeigniter
body: <p>I've used Codeigniter3.0.4 as the document provide I can't configure multiple database and using <strong>'failover' => array()</strong>.</p>
  
  <p>I found an errros <strong>You have not selected a database type to connect to.</strong> on my website if I used this options</p>
  
  <pre><code>$active_group = 'default';
  $active_record = TRUE;
  $db['default']['failover'] = array(
      array(
          'hostname' =&gt; 'localhost',
          'username' =&gt; 'root',
          'password' =&gt; '',
          'database' =&gt; 'com',
          'dbdriver' =&gt; 'mysqli',
          'dbprefix' =&gt; '',
          'pconnect' =&gt; TRUE,
          'db_debug' =&gt; TRUE,
          'cache_on' =&gt; FALSE,
          'cachedir' =&gt; '',
          'char_set' =&gt; 'utf8',
          'dbcollat' =&gt; 'utf8_general_ci',
          'swap_pre' =&gt; '',
          'encrypt' =&gt; FALSE,
          'compress' =&gt; FALSE,
          'stricton' =&gt; FALSE
      ),
      array(
          'hostname' =&gt; 'localhost2',
          'username' =&gt; 'root',
          'password' =&gt; '',
          'database' =&gt; 'ABC',
          'dbdriver' =&gt; 'mysqli',
          'dbprefix' =&gt; '',
          'pconnect' =&gt; TRUE,
          'db_debug' =&gt; TRUE,
          'cache_on' =&gt; FALSE,
          'cachedir' =&gt; '',
          'char_set' =&gt; 'utf8',
          'dbcollat' =&gt; 'utf8_general_ci',
          'swap_pre' =&gt; '',
          'encrypt' =&gt; FALSE,
          'compress' =&gt; FALSE,
          'stricton' =&gt; FALSE
      )
  );
  </code></pre>
  
  <p>Please help how should I do.</p>