By: Tom Muck on Thursday, May 20, 2010
When you have a database table that gets updated or changed, it makes sense to keep track of those updates. A relational database table is like a snapshot in time. It contains your data in its most recent form. When you update it, the previous data is lost. For example, a product might have a price. When you change that price, the previous price is lost. Many times it can be retrieved from a log, but another way to make sure you have an audit trail of your data is to create dedicated audit tables for each table that you want to keep track of.
This first two parts of the series showed a simple way to create an audit table and related functionality in MySQL without needing to modify your web application much at all. The third and final part will show a simple report on the web of the audit results. For the article, I'll assume you know how to set up PHP sites, work with basic database operations in PHP (listing, inserting, updating data), and working with session variables.
The Audit a MySQL Data Table Series:
Audit a MySQL Data Table - Part 1
Audit a MySQL Data Table - Part 2
Audit a MySQL Data Table - Part 3
Purchase this item
You can purchase this piece of content separately for $4.00
Community MX members get unlimited access to daily articles, tutorials, extensions and support. The most comprehensive resource for Macromedia designers and developers today. Take a tour of what we offer, and discover the benefits of subscribing.
Already a member?
Simply log in using the form in the top right area of the site.