I have the following trigger:
CREATE OR REPLACE TRIGGER tr_insercion_evento
AFTER INSERT ON evento
BEGIN
INSERT INTO historico_evento(historico_evento.id, historico_evento.fecha_cambio, historico_evento.evento_id, historico_evento.usuario_exowner)
VALUES(NULL, sysdate, :NEW.id, :NEW.usuario_owner)
END tr_insercion_evento;//
In PhpMyAdmin I indicated that the delimiter is "//" (I also tried to do it from the same sentence with "DELIMITER //", but there is no case:
#1064 - Algo está equivocado en su sintax cerca 'TRIGGER tr_insercion_evento
AFTER INSERT ON evento
BEGIN
INSERT ' en la linea 1
Event table
id (int pk), title (text), start (date), end (date), user_owner (int fk-> user)
Historical_table
id (int pk), date_change (date), event_id (int fk-> event), user_exowner (int)
User table
id (int pk), name (text)
Note: Just in case, I clarify that the restrictions I gave to the fk are cascaded (update and delete).
What am I doing wrong? From what I have read in forums and right here, many of us have problems with phpmyadmin. In Workbench I could do it, but I would like to know how to solve this problem from phpmyadmin itself. Thank you very much.