I am trying to create a trigger in MYSQL through phpmyadmin and I am getting an error message just saying "error" its not giving me any details what the error is. Here is my trigger:
delimiter //
CREATE TRIGGER teacher_ref BEFORE DELETE ON teacher
FOR EACH ROW
BEGIN
DELETE FROM subject WHERE teacherId=old.teacherId;
END;
//
delimiter ;
The definition looks good, all you can do is check if the user in PHPMYADMIN that you are using have all the privileges to create the trigger, also check if the table is correctly created and have the same name and fields.
Hope it helps