CREATE DEFINER = CURRENT_USER TRIGGER
'sistemacc'.'cartaodecredito_AFTER_INSERT' AFTER INSERT ON 'cartaodecredito'
FOR EACH ROW
BEGIN
IF NEW.tipo = 'bronze' THEN
SET NEW.limite = 1000 AND NEW.condicoes='até 2x';
ELSEIF NEW.tipo = 'prata' THEN
SET NEW.limite = 5000 AND NEW.condicoes ='até 8x';
ELSEIF NEW.tipo = 'ouro' THEN
SET NEW.limite = 10000 AND NEW.condicoes = 'até 12x';
END if;
END
And the error that mysql returns is this:
Error 1362: Updating of NEW row is not allowed in after trigger SQL Statement: