Tell me more ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

What's wrong with my trigger? I'm getting this error:

1235 - This version of MySQL doesn't yet support 'multiple triggers with the same action time and event for one table' whats causing this error what wrong ma i doing?? this my trigger below

When I try to create this trigger:

CREATE TRIGGER emplog_update AFTER UPDATE ON gos 
FOR EACH ROW 
INSERT INTO emp  (id, last_name, first_name,action, time_taken, description)
    select NEW.id,NEW.last_name,NEW.first_name,'U',NOW(),USER(),
           concat_ws(',',
                     (case when new.id <> old.id then 'id' end),
                     (case when new.last_name <> old.last_name then 'last_name' end),
                     (case when new.first_name <> old.first_name then 'first_name' end)
                    );       );

How can I resolve this issue?

share|improve this question
Because you already have an AFTER UPDATE trigger for this table. – ypercube Apr 25 at 6:08
i figured thanks i removed it – bli Apr 25 at 6:12
but im getting a column count error when i try to edit – bli Apr 25 at 6:14
@ypercube this is exactly what im getting SQL query: Edit UPDATE work.gos SET first_name = 'maxnn' WHERE gos.id =6 MySQL said: #1136 - Column count doesn't match value count at row 1 – bli Apr 25 at 6:17
You have 7 columns in the select but 6 in the INSERT INTO emp (id, last_name, first_name,action, time_taken, description). User column is missing there. – ypercube Apr 25 at 6:19

closed as too localized by Mat, dezso, ypercube, Phil, Mark Storey-Smith Apr 25 at 11:43

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, see the FAQ.

Browse other questions tagged or ask your own question.