I\'ve got an issue connecting to the database with CodeIgniter.
In the model, if I do
$this->load->database();
then a query such
This is just an alternative if you still can't resolve the issue. Just extend the CI_Model and auto load the database library in the constructor. Then you can just make all other models inherit from that base class.
Example:
load->database();
}
}
And the all others will start like :
This method has the other benefit that you don't have to include the loading code line in every model you create. Also you can easily push shared functionalities among models into the parent MY_Model class.
Hope it helps!