MySql error syntax in trigger -


i have syntax problem in mysql trigger, didn't find issue.

create definer=`root`@`localhost` trigger `after_insert_product`  before insert on `ps_product_lang` each row  begin  if (new.id_shop =1 , new.id_lang = 1)       declare text;      declare b text;      declare c text;      set = '<p style="text-align: justify;"> <span style="font-size: large;"> <span class="mcepagebreak">';      set b = concat(a,new.name);      set c = '</span> </span> </p>';      set new.description = concat(b,c);  end if;  end 

mysql says:

1064 - synthax error near 'declare text; declare b text - lign 4

i typed begin end, declaration generated phpmyadmin, i'm on panel. works without if condition.

(posted on behalf of op):

i have declare variable out of if structure, works now.


Comments