Re: Change tracking



Your proposed solution is far too inflexible. Take a look at
http://www.tonymarston.net/php-mysql/auditlog.html which describes a design
with incorporates a fixed set of audit tables which can deal with logging
changes to any number of application tables with any structure.

--
Tony Marston
http://www.tonymarston.net
http://www.radicore.org


""Mike Smith"" <mikeosmith@xxxxxxxxx> wrote in message
news:d46325db0810311132t19adb035m90bc26d89dce7101@xxxxxxxxxxxxxxxxx
I'm about to try this, but I'd like some suggestions. I have a inventory
table that an employee can update specific fields if they are incorrect,
e.g.

[INVENTORY_TABLE]
fields example data
part 1027P
serial 543221-K
qty 120
location G-5

I'd like to record what changed. Let's say they change the serial. One way
would be a "static" changes table:

[INVENTORY_CHANGES]
fields example data
old_part 1027P
new_part 1027P
old_serial 543221-K
new_serial 543221-4
...

I'm thinking a better/more flexible solution would be

[INVENTORY_CHANGES]
inventory_id (FK to inventory table)
field (in this case it would be serial, detected by comparing POST values
to
original values, but could be serial and qty/location)
original 543221-K
new_value 543221-4

Just curious as to other possible solutions or problems with these
(probably
the second one).

Thanks,
Mike Smith



.



Relevant Pages

  • Re: How to print my own PCB?
    ... On Tue, 05 Oct 2004 01:49:16 GMT, Rich Webb ... >>I am looking to build a basic heating system using the attached design. ... >>incorporates a 555, a variable resistor, some diodes and other bits and ...
    (sci.electronics.basics)
  • Re: User access security linking with table records
    ... Also consider that an audit trail is usual external by ... design: how can you ensure bias will not be introduced into your ... My suggestion is to consider porting the data to a more capable ...
    (microsoft.public.access.forms)
  • How to print my own PCB?
    ... I am looking to build a basic heating system using the attached design. ... incorporates a 555, a variable resistor, some diodes and other bits and ...
    (sci.electronics.components)
  • How to print my own PCB?
    ... I am looking to build a basic heating system using the attached design. ... incorporates a 555, a variable resistor, some diodes and other bits and ...
    (sci.electronics.basics)
  • How to print my own PCB
    ... I am looking to build a basic heating system using the attached design. ... incorporates a 555, a variable resistor, some diodes and other bits and ...
    (sci.electronics.design)