Here I have the following trigger:
USE dbsspf;
DELIMITER $$
CREATE
DEFINER = 'root'@'localhost'
TRIGGER TR_ASSIGN_PAGEINDEX
AFTER INSERT
ON LIB_RECORDS
FOR EACH ROW
BEGIN
UPDATE LIB_RECORDS
SET
PAGE_INDEX = 13;
END
$$
DELIMITER ;
As you can see I’m just updating the table in my trigger. However when I insert a new record the trigger does not fire. Can you please show me what I’ve missed?
http://dev.mysql.com/doc/refman/5.5/en/faqs-triggers.html#qandaitem-B-5-1-9
In other words, a trigger on
LIB_RECORDScannot write other rows onLIB_RECORDS.