dongmao3148 2010-05-09 19:52
浏览 11

比较审计跟踪的值

I'm attempting to develop an audit trail/tracking solution for an existing database written in PLSQL/PHP - however I'm still unsure as of yet on an easy (to implement and maintain) solution for tracking changes to fields/values. For instance, the project tracking portion of the DB APP tracks over 200 fields and ideally I'd like a nice way to show a history of changes, such as:

5/10/2010 - Project 435232 updated by John Doe
Changed Project Name (Old: Test Project; New: Super Test Project)
Changed Submission Date (Old: 5/10/2010; New: 5/11/2010)
Changed Description (Old: This is an example!; New: This is a test example)

Essentially for each field (db column) it would output a new line to show the old/new values. So far my current idea is saving the current version of the data to a temporary table, updating the primary table with the new data then loading each row into an array and doing an array compare to determine the differences. This seems a bit convoluted, and if there is an easier method I'd love to know it.

Any ideas or suggestions are much appreciated!

  • 写回答

1条回答 默认 最新

  • douningchang3610 2010-05-09 20:34
    关注

    What you propose is a very bad - yet very commonly proposed - implementation, for the reasons I list in this other recent SO thread.

    评论

报告相同问题?

悬赏问题

  • ¥500 火焰左右视图、视差(基于双目相机)
  • ¥100 set_link_state
  • ¥15 虚幻5 UE美术毛发渲染
  • ¥15 CVRP 图论 物流运输优化
  • ¥15 Tableau online 嵌入ppt失败
  • ¥100 支付宝网页转账系统不识别账号
  • ¥15 基于单片机的靶位控制系统
  • ¥15 真我手机蓝牙传输进度消息被关闭了,怎么打开?(关键词-消息通知)
  • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
  • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本