[eluser]Unknown[/eluser]
Hi,
I am trying to perform a simple select query in CI. No coditions at this point or anything like that, just simply Select * From 'table' and pass this to a controller and then onto a view.
I'm sure this is really simple but im unable to get it to work. Im constantly receiving the error 'undefinded variable' etc.
here is my model.
Code:
function featured_list()
{
$this->db->select();
$query = $this->db->get('featured');
return $query->result();
}
and my controller
Code:
$this->load->model('featured');
$query['name'] = $this->featured->featured_list();
// Load 'liked' view
$this->template('liked', $query);
In my view I just have a var_dump($query);
Any help would be great.
Thanks