CI error: get_where() on a non-object |
Hello,
I am receiving this error messages: Fatal error: Call to a member function get_where() on a non-object in C:\Program Files (x86)\EasyPHP-DevServer-14.1VC9\data\localweb\masterlinkci2\application\site\models\gallery_model.php on line 10 line 10: Code: $query = $this->db->get_where('galleries_pictures',array('pic_id'=> $pic_unique_id)); model: Code: class Gallery_model extends CI_Model { controller: Code: public function index() view: Code: <?php foreach($pic as $pic_item) { ?> I wonder how to fix the error message?
" If I looks more intelligence please increase my reputation."
Did you autoload the database library
PHP Code: $autoload['libraries'] = array('database'); Your file name is also incorrect should have first letter upper case only Change gallery_model.php To Gallery_model.php
There's only one rule - please don't tell anyone to go and read the manual. Sometimes the manual just SUCKS!
Let us know you things went
There's only one rule - please don't tell anyone to go and read the manual. Sometimes the manual just SUCKS!
|
Welcome Guest, Not a member yet? Register Sign In |