CodeIgniter undefined $db
Posted by zdrsoft on November 03 2013 00:14:44
Using CodeIgniter, if you get message for undefined $db , like this:

Message: Undefined property: YourClass::$db

Probably you forgot to load the data base. Please use the following code for database load.

$this->load->database();