Yes, absolutely appropriate for an ONUPDATE trigger. Insert a new record into the history table before doing the update.
If you want to do this for every field in every table, FoxAudit is the tool of choice. (I don't see it on TakeNote.com's website any more but maybe shoot an email to Jim Duffy)
Eric
On Mon, Apr 22, 2019 at 2:33 PM MB Software Solutions, LLC < mbsoftwaresolutions@mbsoftwaresolutions.com> wrote:
VFP9SP2 app, MariaDB 10 (MySQL) backend.
One of my clients asked about a history of price changes. Easy enough to implement programmatically for the few price fields, but then I got to wondering if simply putting code in the ON UPDATE trigger to send the old record to a "history" table would be a more complete (and long term EASIER) solution, whereby my app would query the "history" table for changes.
Your thoughts for tracking price (or other) changes?
tia, --Mike
This email has been checked for viruses by Avast antivirus software. https://www.avast.com/antivirus
[excessive quoting removed by server]