Check if column UPDATE occurred When we update a MySQL record with php, we can check if it has effect using:

$mysqli-&gt;affected_rows;


But how do I check which column has been modified?

Example, in my table have the columns: id / name / age

In a record we have the data: 1 / Woton / 18

If I send an: UPDATE mytable SET id = '1', name = 'Woton', age = '20' WHERE id = '1'

Only the age field has changed, but SET was for everyone, how do I get the columns back that the data actually changed?
There is no such functionality in the mysql. If you want to trace the changes made to the data you have to collect historical data on your own. Say you create the trigger BEFORE UPDATE that insert all the data from the updated rows into the historical table. Later you can compare the present state of data with the historical states and trace all the changes been made.