I have created this trigger in HeidiSQL IDE for mysql trough IDE´s helper and it worked pretty good. If I copy the create code generated by the IDE and try to run it on phpmyadmin I get a SQL syntax error that I just can´t figure how to fix it. Can anyone help me?
CREATE TRIGGER `teste` AFTER UPDATE ON `ilmug_virtuemart_products` FOR EACH ROW BEGIN
IF (NEW.origem_sync <> 0) THEN
INSERT INTO sincronizar (dataHora,
tipoMovimento,
entidade,
id,
version,
STATUS)
VALUES (CURRENT_TIMESTAMP(),
'update',
'virtuemart_products',
NEW.virtuemart_product_id,
NEW.version,
'pendente');
END IF;
END;