[eluser]otherjohn[/eluser]
Hi all.
I have the following code in a model.
Code:
$select='p.id, p.name_'. $this->_lang .', ap.price';
$this->db->select($select);
$this->db->from('Products p, Agents_Products ap');
$this->db->where('ap.agent_id', $this->agent->id);
$this->db->where('ap.state', $this->state);
$this->db->where('ap.product_id = p.id');
$this->db->where('p.product_type', $this->product_type);
$this->db->where('p.customer_type',$this->customer_type);
//This will execute the query and collect the results and other properties of the query into an object.
$query = $this->db->get();
return $query->result_array();
I get the
Fatal error: Call to a member function load() on a non-object in system/database/DB_driver.php on line 1133
error when this is run.
I am using language files, but I am not sure why this error is thrown. Can someone help?