magento - Trigger - mysql -
create trigger productstatushistory_3 after update on catalog_product_entity_int each row begin if (old.value <> new.value)then insert tbl_product_status_history(entity_id,oldvisible,newvisible,datetime) values(new.entity_id,old.value,new.value,now()); end if; end;
its not working,
error
#1064 - have error in sql syntax; check manual corresponds mysql server version right syntax use near '' @ line 5
you need delimiter
delimiter // create trigger productstatushistory_3 after update on catalog_product_entity_int each row begin if (old.value <> new.value) insert tbl_product_status_history (entity_id,oldvisible,newvisible,datetime) values ( new.entity_id,old.value,new.value,now() ); end if; end;// delimiter ;
Comments
Post a Comment