title: Codeigniter connecting to multiple databases
body: <p>I have been using these lines of code for connecting multiple databases in codeigniter but getting error. My new db connection is for new_group.</p>
  
  <pre><code>$this-&gt;new_group = $this-&gt;CI-&gt;load-&gt;database('new_group', TRUE); 
  $q = $this-&gt;new_group-&gt;query("SELECT* FROM mytable ORDER BY id DESC");
  </code></pre>
  
  <p>Call to a member function database() on a non-object.</p>
  
  <p>Waiting for response. Thanks</p>