Welcome Guest, Not a member yet? Register   Sign In
Fatal error: Call to a member function load() on a non-object in system/database/DB_driver.php on line 1133
#1

[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?
#2

[eluser]pistolPete[/eluser]
Do you autoload the database?
#3

[eluser]otherjohn[/eluser]
I Didnt before this error, but then I did and it still produced the error.

This is just an overlaying error. I did find the true DB error underneath it. But still don't know why this was thrown.




Theme © iAndrew 2016 - Forum software by © MyBB