Join with duplicate data CodeIgniter

0

1 client can have multiple processes and I would like to get in select all processes of a certain area even if it is from the same client. However, this join only returns only one record from a particular client.

$this->db->select('*');
    $this->db->from('processo');
    $this->db->join('cliente', 'processo.id_cliente = cliente.id_cliente');
    $this->db->join('fases_previdencia', 'processo.id_fase = fases_previdencia.id_fases_previdencia');
    $this->db->where('id_area', 4);
    $query = $this->db->get()->result();
    return $query;
    
asked by anonymous 04.03.2018 / 23:40

1 answer

0

You have to do more or less that. Then you select what content will come from your select.

$this->db->select('fases_previdencia.fase'); $this->db->select('cliente.*'); $query = $this->db->get('processo');

    
05.03.2018 / 20:18