Hello, I'm starting my studies in codeIgniter and I came across following.
I have an employer table and another one of vacancies, the vacancy has id of the employer. I would like to display the data from the 2 tables. For example: I type something and it will appear the data of the vacancy and the employer. To appear the job data I did:
Model:
function getVaga($campo_busca) {
$this->db
->select("*")
->from("dados_vaga")
->like('cargo',$campo_busca);
return $qr = $this->db->get()->result();
}
Already in the controller:
public function teste(){
$campo_busca = $this->input->post('teste');
$data = array(
"dados" => $this->Vaga_model->getVaga($campo_busca)
);
$this->load->view('busca', $data);
The employer id is in this table data_vaga to know who is the owner of this vacancy, now I do not know how to pass the same as a parameter to another query.
Good evening, thank you to everyone, big hug.