• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
mysql affected column in mysql trigger

Has anyone been dealing with MySQL triggers ?
I have a problem. I am creating a trigger for a table so that on updating a field value, all the other fields will be updated... I can't figure out how to check which in which column field is affected while on table update.
Hope someone could help me with this one.

Have you looked here?

I don't think there is a function that tells you wether a field has changed or not, but you should be able to compare the new and the old value:
if(NEW.column == OLD.column)
  //do something
or something similar...I'v not yet worked with triggers

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.