Answer the question
In order to leave comments, you need to log in
Why is mysql throwing error?
CREATE TRIGGER marketing_list_update
AFTER UPDATE
ON cms_offers
FOR EACH ROW
begin
if NEW.status = 'active'
then UPDATE marketing_credits_requests SET sum_s=NEW.ammount, statut=NEW.status WHERE id_req=old.id;
else then UPDATE marketing_credits_requests SET statut=NEW.status WHERE id_req=old.id;
end;
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 7
Answer the question
In order to leave comments, you need to log in
24.3.1 Trigger Syntax and Examples
don't forget about DELIMITER
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question