hi
I am learning mysql and have created a table for auditing purposes with fields below , but my problems is I dont know how to go about inserting data into it whenever an event ocurs on my primary tables.especially getting the oldvalue,newvalue,column and table name fields after updates are done on my table
I need a purely simple trigger script that can update this table whenever my primary table gets updated by the users.
these are the only fields that I need for auditing purposes.
HR_Audit_Module table
AuditID(PK)
Table_Name,
tblRow_Id ----this is the ID from the table that gets updated to identify the column name,
Updated_By,
Update_when,
Old_Value,
New_Value,
FieldName (column name),
Operation_Type -- this should be --(update,insert or delete)
thanks in advance