function delete($employee_id) { $success = false; //Don't let employee delete their self if ($employee_id == $this->get_logged_in_employee_info()->person_id) { return false; } //Run these queries as a transaction, we want to make sure we do all or nothing $this->db->trans_start(); //Delete permissions if ($this->db->delete('permissions', array('person_id' => $employee_id))) { //delete from employee table if ($this->db->delete('employees', array('person_id' => $employee_id))) { //delete from person table $success = parent::delete($employee_id); } } $this->db->trans_complete(); return $success; }