I have a problem with a trigger that when I make an insert of a record I want to automatically pass a value that comes by default is 1 to 0 only that is always giving this error.
Can not update table 'receipts' in stored function / trigger because it is already used by statement which invoked this stored function / trigger.
Trigger
CREATE TRIGGER actrecibo AFTER INSERT on Recibos
FOR EACH ROW
BEGIN
UPDATE recibos set is_new = 0 WHERE id = NEW.id;
END
Does anyone know how to look for this and how can I resolve it?