In the model, when I call the following function:
I get this error:Code:return $this->fetchOne($sql);
Fatal error: Call to undefined method Questions::fetchOne() in /var/www/abc/application/models/Users.php on line 101
But when I call this:
It works fine..Code:return $this->_db->fetchOne($sql);
Can someone please tell me why is this hapenning? Why do we need to call the _db to make it work? Is there anyway we can call $this->fetchOne($sql); directly?
Many thanks in advance