[eluser]rufus99[/eluser]
I have this controller code:
Code:
<?php
class Blog extends Controller
{
function Blog()
{
parent::Controller();
}
function index()
{
print_r($this);
$data['query'] = $this->db->get('entries');
$this->load->view('blog_view', $data);
}
}
?>
and I get this error:
---------------------
A PHP Error was encountered
Severity: Notice
Message: Undefined property: Blog::$db
Filename: controllers/blog.php
Line Number: 16
Fatal error: Call to a member function get() on a non-object in C:\Inetpub\wwwroot\ignite\system\application\controllers\blog.php on line 16
Not too sure what I am doing wrong. Could I get some help?
Thanks.