Codeigniter: Select from multiple tables
- by Kevin Brown
How can I select rows from two or more tables?
I'm setting default fields for a form, and I need values from two tables...
My current code reads:
    $this->CI->db->select('*');
    $this->CI->db->from('user_profiles');
    $this->CI->db->where('user_id' , $id);
    $user = $this->CI->db->get();
    $user = $user->row_array();
    $this->CI->validation->set_default_value($user);