Welcome Guest, Not a member yet? Register   Sign In
Fatal error: Call to a member function get() on a non-object in
#8

[eluser]CodeIgniteMe[/eluser]
I recommend autoloading the database class in the config file, so you won't keep in mind to always load the database on every controller or model. Also, using this:
Code:
function test1 ()
{
$CI = & get_instance ();
$q = $CI->db->get('article_content');
return$q->num_rows();
}
is dangerous because you are calling the CI superobject by reference.


Messages In This Thread
Fatal error: Call to a member function get() on a non-object in - by El Forum - 07-01-2011, 02:54 AM



Theme © iAndrew 2016 - Forum software by © MyBB