1
Hello, I have the following case, I have a donor who wishes to make a donation in a center Hemocentro, it makes the search of this center and click on a wish button to donate here. This will create a table in the database called donation marked, with the data: id_donor, id_hemocenter, shift, data_possible_doacao . Now when I log in to Hemocentro on the home screen should appear table data donor that was the same as the donor id_of the marked donor table, in addition to the other data of the marked donation table. But only the donor data is appearing. Follow my select.
$status = 'Aguardando Confirmação';
$this->db
->select("*")
->from("doacao_marcada")
->where('status_doacao_marcada', $status)
->where('id_hemocentro', $this->session->userdata('id_hemocentro'));
$query = $this->db->get()->result();
foreach ($query as $row) {
$this->db->select("*")
->from("doador")
->where("id_doador", $row->id_doador);
return $this->db->get()->result();
}
when you give a
return
, the function simply returns what is going on there and for the execution of the method, what is unclear is exactly what information you need. You want to return the data of ALL donors, right?– Kenny Rafael