0
Hello, I’m starting my studies in codeIgniter and I came across the following.
I have an employer table and another of vacancies, the job has employer id. I would like to show the data of the 2 tables. For example: I type something and it will appear the vacancy and employer data. To appear the vacancy 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 on 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_vacancy to know which is the owner of this vacancy, now I do not know how to pass the same as parameter to another query.
Good evening to all, thank you to whom to reply, big hug.