Beefy Boxes and Bandwidth Generously Provided by pair Networks vroom
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re: Tracking changes to a db table

by kyle (Abbot)
on Feb 07, 2007 at 09:59 UTC ( [id://598784]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


in reply to Tracking changes to a db table

This could be done entirely in the database with a trigger. I haven't actually used triggers before, but I think you can:

  1. Create a table to hold the auditing data you want.
  2. Create a trigger for UPDATE and DELETE. It will write into the auditing table.
  3. Your display would then read out of the auditing table.

Here's PostgreSQL 7.4 Trigger documentation (I don't know what version you're using).

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://598784]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.