log mysql updates
i have a migration script that reads from one DB and write to a second DB

I usually update the existing records.I was wondering how i can log the updates like below

    productID : 125
    title : Product1 => test update
    price : 125 => 140

Whitch means that the productID 125 had title Products1 and became test after update and had price : 125 and became 140

One thought is to read the record keep the values and then update, read again the values and the compare and log what necessary fields.

I was wondering if any other method exist.

Thanks
log mysql updates
===

i have a migration script that reads from one DB and write to a second DB

I usually update the existing records.I was wondering how i can log the updates like below

    productID : 125
    title : Product1 => test update
    price : 125 => 140

Whitch means that the productID 125 had title Products1 and became test after update and had price : 125 and became 140

One thought is to read the record keep the values and then update, read again the values and the compare and log what necessary fields.

I was wondering if any other method exist.

Thanks