[eluser]slowgary[/eluser]
zebake,
I notice you're loading your model with a lower case 's', but it should be capitalized since your model is too. I would expect that to throw it's own error though, so maybe it's not the problem. Oh...I see it. Your model is assigning the query results to $query but not returning any of it. Get rid of the variable and just return it directly. So:
Code:
function get_all_students()
{
//Query the data table for ALL STUDENTS
return $this->db->select('students.*, parents.fname, parents.lname')
->join('students_parents', 'students_parents.student_id = students.student_id')
->join('parents', 'students_parents.parent_id = parents.parent_id')
->order_by('students.lname, students.fname')
->get('students')->result_array();
}
Usually the best way to troubleshoot your actual queries is to throw $this->output->enable_profiler(TRUE) into your controller and then copy and paste the query from your profiling data into something like phpMyAdmin.