I am trying to add a trigger through phpmyadmin 4.4
I get the error:
Why is this happening? How to declare a variable?
Start with BEGIN
, end with END
. Put the various statements between them.
Notice in the error how it is alread providing FOR EACH ...
, but it is depending on you to do the rest. See http://dev.mysql.com/doc/refman/5.7/en/triggers.html (and other pages) for the complete syntax that phpmyadmin is "helping" you generate.