betocardoso 0 Posted April 25, 2020 Report Share Posted April 25, 2020 $this->db->select('usu.nome AS patrocinador'); $this->db->from('usuarios AS usu'); $this->db->join('rede AS rd', 'rd.id_patrocinador = usu.id', 'inner'); $this->db->where('rd.id_patrocinador', $id); $patrocinador = $this->db->get(); if($patrocinador->num_rows() > 0){ $dados['patrocinador'] = $patrocinador->result(); } DA UM ERRO E NÃO FAZ A PESQUISA NA VIEW TA ASSIM <tr> <td>Patrocinador</td> <td><?php echo $usuario['usuario']->patrocinador;?></td> </tr> Quote Link to post Share on other sites
Question
betocardoso 0
$this->db->select('usu.nome AS patrocinador');
$this->db->from('usuarios AS usu');
$this->db->join('rede AS rd', 'rd.id_patrocinador = usu.id', 'inner');
$this->db->where('rd.id_patrocinador', $id);
$patrocinador = $this->db->get();
if($patrocinador->num_rows() > 0){
$dados['patrocinador'] = $patrocinador->result();
}
DA UM ERRO E NÃO FAZ A PESQUISA
NA VIEW TA ASSIM
Link to post
Share on other sites
0 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.