Skip to content

Instantly share code, notes, and snippets.

@stefan-jonker
Forked from anonymous/waarde ophalen
Created January 13, 2012 10:36
Show Gist options
  • Save stefan-jonker/1605458 to your computer and use it in GitHub Desktop.
Save stefan-jonker/1605458 to your computer and use it in GitHub Desktop.
In getOrganisatie moet de waarde van $orga_id in komen... de waardes zijn allemaal al gezet en kloppen.
function getOneTicket($id) {
$q = $this->db->query('SELECT * FROM tickets WHERE id = '.$id);
if($q->num_rows() > 0) {
foreach($q->result() as $row) {
$data[] = $row;
$orga_id = $row->organisatie_id;
}
return $data;
}
}
function getOrganisatie($data->organisatie_id) {
$r = $this->db->query('SELECT * FROM organisatie WHERE id = '.$data->organisatie_id);
if($r->num_rows() > 0) {
$data[] = $r->result();
return $data;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment