Hello I just watched the first/Day1 screencast on Nettuts "CodeIgniter from scracth" And I'm already running into an error I don't understand. Here's a screenshot http://i39.tinypic.com/14mtc0n.jpg
The code in my models\site_model.php is the same as the screencast
models\site_model.php
class Site_model extends CI_Model {
function getAll() {
$q = $this->db->get('test');
if($q->num_rows() > 0) {
foreach ($q->result() as $row) {
$data[] = $row;
}
return $data;
}
}
And the controller controllers\site.php
class Site extends CI_Controller {
function index(){
$this-> load-> model('site_model');
$data['records'] = $this-> site_model-> getAll();
$this-> load-> view('home', $data);
}
}
And here's my db info incase
$db['default']['hostname'] = 'localhost';
$db['default']['username'] = 'root';
$db['default']['password'] = '';
$db['default']['database'] = 'ci_series';
(rest is default below)
Thank you