Call procedure inside trigger in mysql -


i want update counter table when user table modofied.

i have created trigger cal procedure. procudeure not creating. please tell me error in procedure.

create procedure barproc(in id int,in val int) begin declare @total_products int;  set @total_products=(select count(*) user a=id , status='active')  if(@total_products>0)     update counter     set b=val     = id , status='active';  end if; 

try

delimiter $$ create procedure barproc(in id int, in val int) begin if (select count(*)       `user`       = id , `status` = 'active')     update counter        set b = val      = id , `status` = 'active'; end if; end$$  delimiter ; 

Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

javascript - jQuery .height() return 0 when visible but non-0 when hidden -