$this->db
->select(array('courses.Course_Name','teacher.First_Name','teacher.Last_Name','teacher.Reg_Id','teacher_assignment.Assignment_Id','Assignment_Url','assignment.Solution_Url','assignment.Status','courses.Course_Id'));
$this->db
->from(array('student_registration'));
$this->db
->join('courses','student_registration.Course_Id=courses.Course_Id','inner');
$this->db
->Join('teacher_assignment','teacher_assignment.Course_Id=courses.Course_Id','inner');
$this->db
->Join('assignment','assignment.OEN_Number = student_registration.OEN_Number','teacher_assignment.Reg_Id = assignment.Reg_Id','inner');
$this->db
->Join('teacher','teacher.Reg_Id = assignment.Reg_Id','inner');
$this->db
->where(array('student_registration.OEN_Number'=> $uid));
$query = $this->db->get();