patrick

patrick

  • NA
  • 397
  • 0

Trigger an insert upon insert/update

Aug 5 2012 8:24 PM
Hi, I have never used a trigger before, and i am confused about the syntax.
My program uses mysql, and the tables i want to interact with are 'orders' and 'updates'
What I want is for whenever the orders table has an update or insert to the column called 'orderType' it will insert into the updates table column 'type' a value that matches the inserted/updated a value that matches the new ordertype and has a timestamp for the second value.
Please let me know if I am not being clear enough, I have never used triggers before.

Answers (2)