I get this error "Fatal error: calling undefined method CI_DB_mysql_driver :: findVenueInfo ()" when I try to use one of my models.
I have a view with this anchor:
echo anchor('welcome/searchVenue/' . $row->venue_id, $row->venue);
which generates the link: http: //localhost/ci-llmg/index.php/welcome/searchVenue/1
the method is called
function searchVenue()
{
$this->load->model('venues');
$data['info'] = $this->venues->findVenueInfo($this->uri->segment(3));
}
and findVenueInfo function in model (venues.php):
function findVenueInfo($id)
{
$data = array();
$this->db->where('id', $id);
$Q = $this->db->get('venues');
if ($Q->num_rows() > 0)
{
foreach ($Q->result() as $row)
{
$data[] = $row;
}
}
$Q->free_result();
return $data;
}
.. but the result is a fatal error: calling the undefined method CI_DB_mysql_driver :: findVenueInfo () I probably missed something stupid, but I can’t get it to work! What do you think?
source
share