-1
CREATE TRIGGER `lastedited` AFTER UPDATE ON `eng-jap`
FOR EACH ROW
BEGIN
UPDATE `mrhowtos_main`.`eng` 
SET `lastmodified` = CURRENT_TIMESTAMP WHERE `eng`.`english` = old.eng;
UPDATE `mrhowtos_main`.`jap` 
SET `lastmodified` = CURRENT_TIMESTAMP WHERE `jap`.`japanese` = old.jap;
END;

MySQLによって返されるエラーは次のとおりです:MySQLは言った:ドキュメント

#1064 - You have an error in your SQL syntax; check the manual that corresponds
to your MySQL server version for the right syntax to use near '' at line 5 
4

1 に答える 1

1
#START TRIGGER
    delimiter $$
    CREATE TRIGGER `lastedited` AFTER UPDATE ON `eng-jap`
    FOR EACH ROW
    BEGIN
    UPDATE `mrhowtos_main`.`eng` 
    SET `lastmodified` = CURRENT_TIMESTAMP WHERE `eng`.`english` = old.eng;
    UPDATE `mrhowtos_main`.`jap` 
    SET `lastmodified` = CURRENT_TIMESTAMP WHERE `jap`.`japanese` = old.jap;
    END;
    $$

それでも機能しない場合は、old.engとold.japを「roma」などの静的な値に置き換えてみてください

于 2012-05-16T00:35:36.790 に答える