title: Codeigniter - Call to undefined method CI_DB_mysql_driver::
body: <p>I am getting this error "Fatal error: Call to undefined method CI_DB_mysql_driver::findVenueInfo()" when I try to use one of my models.</p>
  
  <p>I have a view with this anchor:</p>
  
  <pre><code>echo anchor('welcome/searchVenue/' . $row-&gt;venue_id, $row-&gt;venue);
  </code></pre>
  
  <p>which generates a link like: <a href="http://localhost/ci-llmg/index.php/welcome/searchVenue/1" rel="nofollow noreferrer">http://localhost/ci-llmg/index.php/welcome/searchVenue/1</a></p>
  
  <p>the method called is</p>
  
  <pre><code>function searchVenue()
  {
      $this-&gt;load-&gt;model('venues');
      //get venue info
      $data['info'] = $this-&gt;venues-&gt;findVenueInfo($this-&gt;uri-&gt;segment(3)); //this line generates the error
  
  }
  </code></pre>
  
  <p>and the findVenueInfo function in the model (venues.php) is:</p>
  
  <pre><code>function findVenueInfo($id)
  {
      $data = array();
      $this-&gt;db-&gt;where('id', $id);
  
      $Q = $this-&gt;db-&gt;get('venues');
      if ($Q-&gt;num_rows() &gt; 0)
      {
          foreach ($Q-&gt;result() as $row)
          {
              $data[] = $row;
          }
      }
  
      $Q-&gt;free_result();
      return $data;
  }
  </code></pre>
  
  <p>..but the result of this is Fatal error: Call to undefined method CI_DB_mysql_driver::findVenueInfo()
  I'm probably missing something stupid, but can't get it to work! What do you think?</p>