In my database I want to track the value of a column whenever it is changed .In a way such that every time value of a field changes we can know what was the previous value .It would be awesome to assign timestamps to each change.I am using MySQL as the database server.
解决方案
To do that you need to create a trigger, which is an event that is fired when an INSERT, UPDATE, DELETE occurs on a given table.
Look at the documentation for CREATE TRIGGER.
For what you want to do, you probably need to have an auxiliary table that has a row inserted for each INSERT/UPDATE on the main table, AFTER it happens containing the ID of the row changed, the old value the new value and a timestamp.