mhs (id,name, address, status);
detail_mhs(id_detail, id_status)
id_status foregn key to status on mhs table.
my problem, when i delete data on detail_mhs i wanna update data on mhs table..
$crud->callback_after_delete(array($this, 'set_sudah_jadi_dua'));
function set_sudah_jadi_dua($primary_key){
$query = $this->db->query("UPDATE KKN_MHS SET SUDAH='2' WHERE NO=(SELECT NO FROM KKN_DETAIL_KELOMPOK WHERE ID_DETAIL_KELOMPOK='$primary_key')");
return $query;
}
where is my mistake?, I know that call back after deleting only use 1 parameter its table's primary key,
so my query like this:
"UPDATE KKN_MHS SET SUDAH='2' WHERE NO=(SELECT NO FROM KKN_DETAIL_KELOMPOK WHERE ID_DETAIL_KELOMPOK='$primary_key')"