Hey again.
I want to create a model/wrapper layer that when a row is updated from a database, it also updates a log.
What would be the best way of doing this?
If you're using ORM, you might be able to use an observer.
If you're using the database class, I don't have a ready answer. I'm looking into it myself, I have a workflow engine in the works that is (amongst others) database triggered.
I've been looking at them, but I suppose I should elaborate a bit further on my problem.
I have 3 tables that are the source of Inventory for products, the totals of which populate 3 columns of the inventories table.
These 3 seperate tables exist to help uniquely identify the inventory sources
When data is inserted/updated from any inventory source, all corresponding tables need to be updated respectively.
Once the tables have been updated, there are[seperate] "abstraction" logs that correspond for each table.
Extending said abstraction log, is one table, for each possible modifiable column for each table. (cost, shelf, etc) [this helps with non-null values when one field is updated], which relate to the abstraction logs origional insert datetime/employee id, etc.
And that's my problem