phpmyadmin 4.4.15.7 mysql 5.6.37
我的TRIGGER已创建但我收到错误
\1
#1064 - 您的SQL语法出错;检查与您的MySQL服务器版本对应的手册,以便在'|'附近使用正确的语法第6行
感谢您的帮助
答案 0 :(得分:0)
由于触发器主体中只有一个sql语句,因此不需要begin-end,也不需要更改语句分隔符:
document.addEventListener("deviceready", onDeviceReady, false);
function onDeviceReady() {
var deviceVersion = device.version;
console.log(deviceVersion);}
答案 1 :(得分:0)
我终于以这种方式得到了它
DELIMITER |
CREATE TRIGGER trgNewslist AFTER INSERT ON lisc_usergroups
FOR EACH ROW
BEGIN
INSERT INTO lisc_acymailing_list
SELECT `title`, '', 0, `id`,1, 60, LOWER(REPLACE(`title`, ' ', '' )), '#000000', 1,0,0, 'list', 'all','none', 'all', 0, ''
FROM lisc_usergroups
ORDER BY `id` DESC
LIMIT 1;
UPDATE lisc_acymailing_list SET `alias`= REPLACE(`alias`, 'ß', 'ss');
UPDATE lisc_acymailing_list SET `alias`= REPLACE(`alias`, 'ä', 'ae');
UPDATE lisc_acymailing_list SET `alias`= REPLACE(`alias`, 'ë', 'e');
UPDATE lisc_acymailing_list SET `alias`= REPLACE(`alias`, 'ï', 'ie');
UPDATE lisc_acymailing_list SET `alias`= REPLACE(`alias`, 'ö', 'oe');
UPDATE lisc_acymailing_list SET `alias`= REPLACE(`alias`, 'ü', 'ue');
UPDATE lisc_acymailing_list SET `alias`= REPLACE(`alias`, '"', '');
END;
没有|在末尾 如果我不把DELIMITER |在顶部它不起作用
我觉得语法很奇怪
感谢alll