>Is there a way in mysql to discern when the last date/time a field, row, or
table was been updated or inserted? Thanks, ike
Maybe, for rows. A timestamp field (well, the first one) is
automatically set to the current time when the row is modified, or
when the row is created, UNLESS it is explicitly set to another
time other than null. So if you handle it properly, you've got a
row-last-modified-time field. Insert it as null (or leave it out
of the field list), and don't update it at all. It will be maintained
for you. But it is easy to fake it by explicitly setting that field
to something else.
Table modification times are available with SHOW TABLE STATUS.
These may be more recent than expected due to things that might not
be considered modifications, like OPTIMIZE TABLE, which doesn't
really change any of the data.
There's no place to store a modification time for every field, and
no automatic way of updating them, unless you use triggers (available
in MySQL 5.0). Then you could have an automatically-maintained
update log (field FOO of table BAR changed from %s to %s at <time>
by <user>) in another table used to track the changes.
Gordon L. Burditt