dmccabe Posted December 30, 2008 Share Posted December 30, 2008 I am working on a vehicle sales database for my work and they have requested that it has some sort of audit trail where by it logs when certain values are changed. I was after any advice on the best way of creating an audit trail and what sort of info I should track. I have the login names and everything sorted, I am more after how you would go about it. Quote Link to comment Share on other sites More sharing options...
dmccabe Posted December 30, 2008 Author Share Posted December 30, 2008 Sorry just be a bit more specific on what I am wanting. Is there anyway to trigger a db update when another one is noticed? So if anything in the db is altered, then write to separate table, which value was altered, from what and to what? Quote Link to comment Share on other sites More sharing options...
gevans Posted December 30, 2008 Share Posted December 30, 2008 Maybe add another table that hold records of whats been updated and the time it was done, so if you run a query to update the first table use the id to update a second table with the time it's done Quote Link to comment Share on other sites More sharing options...
PFMaBiSmAd Posted December 30, 2008 Share Posted December 30, 2008 http://dev.mysql.com/doc/refman/5.0/en/triggers.html Quote Link to comment Share on other sites More sharing options...
dmccabe Posted December 30, 2008 Author Share Posted December 30, 2008 Excellent I will have a read thanks PFM Quote Link to comment Share on other sites More sharing options...
bluesoul Posted December 30, 2008 Share Posted December 30, 2008 http://dev.mysql.com/doc/refman/5.0/en/triggers.html I've never messed with triggers, is it limited to static definitions or can it do, say, a session variable (username)? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.