Sticky Posts
Jul 4, 2009
How To: Tracking MySQL Row Create / Update Time
Inside the mysql information_schema schema :) there's a table that keeps track of creation / update times for tables. But there is no internal tracker for row / record creation / update time ... that you can access. Nevertheless MySQL offers a very cool method to add columns to do this yourself.
These columns are ... how to put it ... hands off. Once you add them they can track row creation and update time by themselves. You don't need to keep track of them when you insert / update records. They will just work and you can always query them to get record creation / last update time.
The two functions below will give you a very easy way to push intelligent timestamp columns in your existing tables. Code uses MySQL stubs.
Registration is FREE, quick, painless and worth its weight in gold.

