Hello, I have the following tables in the database:
- data_vaga where it has several fields and one of them is id_vaga, id_academico.
- sender_date where it has several fields and one is the following id_vaga.
When I save a job it has the id_vaga, which in the future when a person is going to register in the vacancy (table data_candidato) saves in it the id_vaga and the id_academico referring to the vacancy and the user in question.
So it will happen that a candidate has several vacancies to which the same has applied, how do I list those vacancies? So, as there are several id_vaga for the same candidate I do not know how to pass them to the query. I tried to do the following:
function getMinhasVagas($id_academico){
$id_academico = $this->session->userdata('id_academico');
$this->db
->select("id_vaga")
->from("dados_candidato")
->where('id_academico', $id_academico );
$qr = $this->db->get()->result();
$this->db->select("*")->from("dados_vaga")->where('id_vaga', $qr);
return $teste = $this->db->get()->result();
}
Returns the following error: Unknown column 'Array' in 'where clause'.
Thanks to anyone who answers me, have a nice day.