In my database I have a updateinfo with timestamp etc. which should updated every time the values has changes/update.
actually I check at first if there has changed value (old) and value (new) only if it is, I add the update value with new updateinfos.
Now I ask myself how I can do it easier and faster. Normally MySQL doesn't update something if the value has not changed. But what about my updateinfos. If I add them MySQL will update them every time. How can I do it that MySQL only sets the new updateinfos if there is really a changed value?
For Example
mysql SET a=1, b=2, Updateinfo='TIMESTAMP+IP'
What I looking for is a kind like this
mysql SET a=1, b=2, (Updateinfo='Timestamp+IP' ONLY IF a or b has updated)
So is there a way to add the field Updateinfo='Timestamp...' to the query if there is a change by one of the SET a=1, b=2?
Hope I could explain what I'm looking for.
aorbhas new data to update thanudateinfowill update?