1
I am having problems performing a system. I am doing a Join and the following error appears:
Error Number: 1052 Column 'id_doador' in Where clause is ambiguous SELECT * FROM
doacao
JOINdoador
ONdoacao
.id_doador
= 'donor.
donorWHERE
id_donor` = '1'
Below is my model method.
public function minhasDoacoes(){
$id_doador = $this->session->userdata('id_doador');
$this->db
->select('*')
->from('doacao')
->join('doador', 'doacao.id_doador = doador.id_doador')
->where('id_doador', $id_doador);
return $this->db->get()->result();
}
Hello all right? Wouldn’t it be
->where('doador.id_doador', $id_doador);
?– Leandro Simões