As a workaround for this i would not use triggers !! just alter your design and add a ON UPDATE CASCADE
constraint ,so only one action will be needed as the constraint will do the rest. Check this link for more details.
As for the trigger option
Only one action trigger is possible. To make it easy to understand see example :
mysql> CREATE TABLE actor(
actor_id SMALLINT(5) UNSIGNED NOT NULL AUTO_INCREMENT,
first_name VARCHAR(45) NOT NULL,
last_name VARCHAR(45) NOT NULL,
last_update TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (actor_id),
INDEX idx_actor_last_name (last_name)
);
Create first trigger :
mysql> DELIMITER $$
mysql>
mysql> CREATE TRIGGER trigger1
-> AFTER INSERT
-> ON actor
-> FOR EACH ROW
-> BEGIN
-> -- code
-> END
-> $$
Query OK, 0 rows affected (0.00 sec)
Create second trigger :
mysql> CREATE TRIGGER trigger2
-> AFTER UPDATE
-> ON actor
-> FOR EACH ROW
-> BEGIN
-> -- code
-> END
-> $$
Query OK, 0 rows affected (0.00 sec)
Create third action triger :
mysql> CREATE TRIGGER trigger3
-> AFTER DELETE
-> ON actor
-> FOR EACH ROW
-> BEGIN
-> -- code
-> END
-> $$
DELIMITER ;Query OK, 0 rows affected (0.01 sec)
Now let's try to create a fort trigger with the same action as the first trigger
mysql> CREATE TRIGGER trigger11
-> AFTER INSERT
-> ON actor
-> FOR EACH ROW
-> BEGIN
-> -- code
-> END
-> $$
ERROR 1235 (42000): This version of MySQL doesn't yet support 'multiple triggers with the same action time and event for one table'
So end of story - you cannot create the trigger the way you have written it - make two different triggers as the evens are different.
So my advice is to create two triggers on that table and make sure to put them in block to avoid problems at execution level (very little chance).