headhunter
Posts: 130
|
Posted: 04/02/2012, 8:47 AM |
|
Hello,
I want to have a history of all transactions (form submissions) in my ccs web application. Can this be done without diagrammatically customize the code for each form?
For example logging the insert, update or delete sql statements.
All suggestions are welcome.
thank you.
|
|
|
Rick
Posts: 52
|
Posted: 04/02/2012, 11:33 AM |
|
Sounds like you should look at using a trigger, add, update, and delete triggers. That way their is no code to maintain in multiple forms if you are modifying table data on multiple forms because whenever there was an update, that would trigger running the trigger code for updates on that table (and likewise use the appropriate trigger for Adds and Deletes).
You can update the same log table for all additions, modifications, and deletions to the underlying table or just those based on some criteria. In any rate the log table could hold all the transactions done to that table.
Assuming you are using MySQL see:
http://dev.mysql.com/doc/refman/5.0/en/triggers.html http://dev.mysql.com/doc/refman/5.0/en/trigger-syntax.html
|
|
|
headhunter
Posts: 130
|
Posted: 04/02/2012, 12:02 PM |
|
Hi Rick,
Thanks for your response.
Never used triggers (until now), but I think it is indeed the easiest solution.
I will look into this.
Thanks for the advice.
|
|
|
|