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 -

Socket.connect doesn't throw exception in Android -

iphone - How do I keep MDScrollView from truncating my row headers and making my cells look bad? -