Well I am using MySQL Event and it generated when record inserted in table..... I don't know how to give foreign key to MySQL event with table record
$schedule = $this->db->query("CREATE EVENT ".$data['id']." ON SCHEDULE
EVERY 1 MONTH ON COMPLETION PRESERVE ENABLE DO INSERT INTO oops_invoice
(id, prefix, number, bill, account_id, order_delivery_id, date, staff_id,
customer_note, recurrence, status, itp, utp) VALUES ('', '".$data['prefix']."',
'".$data['number']."', '".$data['bill']."', '".$data['account_id']."', NULL,
'".$data['date']."', NULL,'".$data['customer_note']."', '".$data['recurrence']."',
'Draft', '".$data['itp']."', CURRENT_TIMESTAMP)");
$this->db->query("SET GLOBAL event_scheduler = 'ON'");
My problem is that when entry of the table is deleted at that time it's appropriate MySQL Event should be deleted....
It means something like foreign key to MySQL event please someone help me....
I think you are asking is not possible but instead of that you can use trigger...
which will help you that when you row in table is deleted from phpmyadmin at that time according to trigger and row id you can delete your MySQL event.