I am running into a slight problem, I need to generate a report that focuses on the changes on certain fields in a database. What I figured to do, is something like this
“If Updated, Insert today’s date in seperate field”
that way, when I generate the report, I can verify which entries have been modified by checking the date.
Problem is, I am unsure how to do this with php/codeigniter
Thanks for the tips!
You could add a timestamp field to your table structure
Take a look at the manual for the available syntax
http://dev.mysql.com/doc/refman/5.0/en/timestamp.html
edit.
If you need to update the time only if specific fields change, then you need a trigger.
in my example last_update field will be update with current time only if field2 or field3 change.