UPDATE 10Jun12:
I have not had chance to package up the source code for this - however - it is all written. There's a full write up/article detailing exactly what I did/how it works here:
PHP MySQL "instant" Audit Trail:
http://www.flatcoder.co.uk/php-mysql-instant-auditorauditing/
This came about when a client asked for a way to audit their system. The codebase was an old PHP application with more files/scripts that anyone would like to plough through!
The solution was a simple "drop...