I want to see new records and updates entered in the log table, I created a trigger for this but I get error 1442. Can you help me, please?
CREATE TRIGGER `trigger_changes`
AFTER UPDATE ON `customers`
FOR EACH ROW
Update customers c INNER JOIN cust_changes ch ON ch.id = c.id SET ch.name = c.name
1442 - Can't update table 'cust_changes' in stored function/trigger because it is already used by statement which invoked this stored function/trigger
You have to reference the data in the trigger using the pseudo table name OLD or NEW.