attaboy Posted May 25, 2012 Share Posted May 25, 2012 MySQL version 5.5.16 When I run this code I create a trigger on one table that makes updates to 2 other tables whenever I change the code column on the first table. It works fine for me but I gave this code to a friend and when she tries it she gets an error message back saying that her version of MySQL won't support changes to multiple tables from a single trigger. We both installed MySQL around the same time she uses wamp I use xampp. Is it possible this could be fixed by changing an ini setting? delimiter // mysql> CREATE TRIGGER -> CodeChange_au -> AFTER UPDATE -> on country -> FOR EACH ROW -> BEGIN -> set @code_new = NEW.Code; -> set @code_old = OLD.Code; -> UPDATE city SET CountryCode = @code_new -> WHERE CountryCode = @code_old; -> UPDATE CountryLanguage SET CountryCode = @code_new -> WHERE CountryCode = @code_old; -> END// Quote Link to comment Share on other sites More sharing options...
attaboy Posted May 26, 2012 Author Share Posted May 26, 2012 she just had a leftover trigger that she needed to drop. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.