$q = "SELECT A.user_id, A.uname, A.user_type_id, D.lname, D.fname, D.email, T.user_type_name FROM user as A LEFT JOIN user_details as D ON A.user_id = D.user_det_id;
$query = $this->db->query($q);
return $query->result();//array of user record as objects
}
this is what i did with mine... i joined two tables using the sql query... you may also join 2 or more tables with that..