I have the following trigger created in phpMyAdmin:
Table: tb_agenda
Time: AFTER
Event: INSERT
BEGIN
INSERT INTO tb_realizacao (dt_agenda,
titulo,
titulo_en,
descricao,
descricao_en,
dt_cadastro)
SELECT dt_agenda,
titulo,
titulo_en,
descricao,
descricao_en,
dt_cadastro
FROM tb_agenda
WHERE dt_agenda < NOW();
DELETE FROM tb_agenda
WHERE dt_agenda < NOW();
END
The trigger works 50%. The INSERT instruction works perfectly but the DELETE one doesn't execute. I tried to execute it in the SQL panel and it works fine.