Codeigniter: Select from multiple tables

Posted by Kevin Brown on Stack Overflow See other posts from Stack Overflow or by Kevin Brown
Published on 2010-05-05T15:23:58Z Indexed on 2010/05/05 15:28 UTC
Read the original article Hit count: 450

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);

© Stack Overflow or respective owner

Related posts about codeigniter

Related posts about multiple