title: Codeigniter Multiple Database connections
body: <p>I'm diving into multiple database usage. According to the codeigniter user guide. To connect to the additional databases use use the following</p>
  
  <pre><code>$db2 = $this-&gt;load-&gt;database('second');
  </code></pre>
  
  <p>then to interact use,</p>
  
  <pre><code>$db2-&gt;get('second_table');
  </code></pre>
  
  <p>I'm receiving a Fatal error call to a member function "where()" on a non-object.</p>
  
  <p>for the following line</p>
  
  <pre><code>$db2-&gt;where('field1', $data['item']);
  </code></pre>
  
  <p>and also for</p>
  
  <pre><code>$db2-&gt;get('second_table');
  </code></pre>
  
  <p>Where am I going wrong with this? </p>
  
  <p>Thanks for any help. </p>