0
create trigger ins_notification after insert on transaction_detail
for each row
Begin

  insert into sell_notifications(user_id, product_id, quantity)
  values(new.transaction_id , new.product_id, new.quantity);

End;

Can any one see where's the problem? :(

2
Contributors
1
Reply
2
Views
5 Years
Discussion Span
Last Post by smantscheff
0

Probably you forgot to change the delimiter before creating the trigger.

DELIMITER //
create trigger ins_notification after insert on transaction_detail
for each row
Begin
  insert into sell_notifications(user_id, product_id, quantity)
  values(new.transaction_id , new.product_id, new.quantity);
End //
DELIMITER ;

Though this would be much easier to verify if you showed us the error message instead of let us grope in the dark.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.