[eluser]Pascal Kriete[/eluser]
You need to return something to the controller. Right now you're just echoing (adding to the browser output).
You could return the result set if you have results:
Code:
function retrieve_members()
{
$query = $this->db->query('SELECT id, firstName, lastName, memberNum, email FROM member');
return ($query->num_rows() > 0) ? $query->result() : FALSE;
}
I prefer just returning the $query object, but let's use the above example - the controller could be:
Code:
$data['members'] = $this->CMS_model->retrieve_members();
$this->load->view('template', $data);
And then loop through $members in the view and show the details (or do whatever you need to with the data, I obviously don't know where this is going).
Hope that helps.
Welcome to CodeIgniter.