Database access error

#1
[eluser]Perkin5[/eluser]
I've started following Jeffrey Way's Nettuts CodeIgniter video tutorials but although my code follows his exactly, I get an error at the line where the model function tries to 'get' a database table using active_record syntax.

The code is
Code:
$q = $this->db->get('test');
The error is Fatal error: Call to a member function get() on a non-object

I have the code on my website where you can see the problem:

www.mikeheath.co.uk

and I'm wondering if the codeigniter version I have (2.0.2) differs substantially from the one he was using (1.7.1). I've already noticed that the base classes are now called CI_model etc instead of just model and there may be other changes. Is the active_record syntax the same?

By the way, I have checked the database config settings using a non-codeigniter file. Check it yourself at www.mikeheath.co.uk/dbtest.php

Grateful for any suggestions as to what is wrong.


Messages In This Thread
Database access error - by El Forum - 05-17-2011, 08:41 AM
Database access error - by El Forum - 05-17-2011, 04:39 PM
Database access error - by El Forum - 05-17-2011, 05:15 PM
Database access error - by El Forum - 05-18-2011, 05:15 AM
Database access error - by El Forum - 05-18-2011, 05:22 AM
Database access error - by El Forum - 05-18-2011, 05:29 AM
Database access error - by El Forum - 05-18-2011, 05:41 AM
Database access error - by El Forum - 05-18-2011, 07:15 AM
Database access error - by El Forum - 05-18-2011, 07:55 AM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.