dadamssg Posted January 7, 2010 Share Posted January 7, 2010 so im going their there tutorial and this line of code is throwing an error. i have done everything else correctly. $data['query'] = $this->db->get('test'); i get this Fatal error: Call to a member function get() on a non-object in /controllers/blog.php on line 16 and yes 'test' is the name of my table in my database. And it does have several rows anyone know what im doing wrong???? Quote Link to comment https://forums.phpfreaks.com/topic/187515-codeigniter-help-with-retrieving-info-from-db/ Share on other sites More sharing options...
trq Posted January 7, 2010 Share Posted January 7, 2010 It would appear $this->db is not an object. Where is it defined? ps: I'm not a CI user. Quote Link to comment https://forums.phpfreaks.com/topic/187515-codeigniter-help-with-retrieving-info-from-db/#findComment-990089 Share on other sites More sharing options...
dominicd Posted January 15, 2010 Share Posted January 15, 2010 $this->db->get is part of the CI libraries as long as he is loading the libraries via autoload.php or class Blog extends Controller() Quote Link to comment https://forums.phpfreaks.com/topic/187515-codeigniter-help-with-retrieving-info-from-db/#findComment-995511 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.