[eluser]introvert[/eluser]
Hello,
I have a simple line of code:
Code:
$query = $this->CI->db->get_where('blogs', array('id' => $id));
Heres how I declare var $CI inside the class:
Code:
var $CI;
function __construct() {
$this->CI =& get_instance();
}
Which will produce the following error:
Fatal error: Call to a member function get_where() on a non-object
What am I doing wrong?
Thanks for help!