How to group data changes by operation with MySQL triggers
- by Jan-Henk
I am using triggers in MySQL to log changes to the data. These changes are recorded on a row level. I can now insert an entry in my log table for each row that is changed. However, I also need to record the operation to which the changes belong.
For example, a delete operation like "DELETE * FROM table WHERE type=x" can delete multiple rows. With…