I am pretty inexperienced with this.
I need a generic trigger, able to create and save in a fixed table some sort of identification data for a changed row from generic (any) table. The identification data should be used later to SELECT the changed item in the given table.
Can be this done without previously knowing the table structure?
The only idea I had, but it's way too inefficient in my opinion, also requires previous knowledge of the table column names, is to save a hash by:
MD5(concat(NEW.field1, NEW.field2, NEW.field3, ...))
then
SELECT * FROM chaged_table WHERE hash = MD5(concat(field1, field2, field3, ...))
to identify the changed row in the table which triggered the change.
I would greatly appreciate any help or suggestions!