[eluser]Unknown[/eluser]
Hello,
I have a problem and i hope someone can help me out. Basicly what i want is to select all data from another table on a data select.
what i do is:
Code:
$this->db->select('*');
$this->db->from('gebruikers');
$this->db->join('gebruikers_rollen','gebruikers_rollen.id=gebruikers.rol');
$this->db->where('gebruiker_id',$this->uri->segment(3, 0));
$data['query'] = $this->db->get();
$this->load->view('view_gebruiker', $data);
This results in the right data for that user... But on the view i want to have all data loaded from the table gebruikers_rollen(so i can change the value if needed)..
What i want is something like this
Name : Jeroen
Use role: ((-> selected becuase of join Admin), gebruiker, gebruiker_rol3)
Without Codeignitor i would use a query in the select query, but im not sure how to do it in CodeIgnitor.