mysql affected column in mysql trigger |
[eluser]Skuja[/eluser]
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.
[eluser]davidbehler[/eluser]
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: Code: if(NEW.column == OLD.column) |
Welcome Guest, Not a member yet? Register Sign In |