Skip to content

Instantly share code, notes, and snippets.

@bradrice
Created October 1, 2012 18:06
Show Gist options
  • Save bradrice/3813394 to your computer and use it in GitHub Desktop.
Save bradrice/3813394 to your computer and use it in GitHub Desktop.
curriculum_course_other
public function get_curriculum_course_other_details($curriculumID)
{
return $this->db
->select('a.*,c.name as "className",b.name as "title"')
->from('curr_courses a')
->join('other_courses b', 'a.class = b.id', 'left')
->join('other_depts c','b.other_dept_id = c.id', 'left')
->where('a.curriculum_id', $curriculumID)
->where('a.flag_other', 1)
->order_by('a.year asc, a.term asc')
->get();
}
@bradrice
Copy link
Author

bradrice commented Oct 1, 2012

I added 'left' to line 6 and 7
I added where('a.flag_other', 1)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment