[eluser]Unknown[/eluser]
Hi,
I'm new to codeigniter and am following the video tutorial's, whilst trying to connect to my own mysql db and view my own tables.
I have created this class
class Dmp extends Controller {
function index()
{
$data['title'] = "Orders";
$data['heading'] = "Order Details";
$data['query'] = $this->db->get('orders_BDS');
$this->load->view('dmp_view', $data);
}
}
order_BDS is the name of a table on my db, but when viewing the index.php page online i get the following error;
Fatal error: Call to a member function on a non-object in *****/system/application/controllers/dmp.php on line 9
Line 9 relates to the db get function, if i comment it out the pages loads.
What have i done wrong.
Thanks in advance.
Mike