Page 1 of 1

proble with the trigger in phpmyadmin

Posted: Thu Nov 16, 2017 3:31 am
by maheshn
IF NEW.avg > 15
THEN
SET NEW.grade='p'
ELSE
SET NEW.grade='F'
END IF ;

I am applying this trigger before insert in xampp .but i am getting an syntax error #1064 you have an error in sql syntax near ELSE SET NEW.grade='F'
END IF ;

please help me to resolve this error

Re: proble with the trigger in phpmyadmin

Posted: Thu Nov 16, 2017 10:27 pm
by benanamen
Looks like you're missing semi-colons.

Re: problem with the trigger in phpmyadmin

Posted: Thu Nov 16, 2017 11:08 pm
by maheshn
Thank u very much .. can u plz tell me where am I missing semicolon