I'm having trouble making a system. I'm doing a join and the following error appears:
Error Number: 1052 Column 'donor_id' in where clause is ambiguous SELECT * FROM
doacao
JOINdoador
ONdoacao
.id_doador
= 'donor.
donor_idWHERE
donor_id' = '1'
Below is my method in the model.
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();
}