1
嗨我堅持使這個觸發器插入我的日誌表的值的語法。使用SQL選項卡里面phpmyadmin的錯誤執行SQL語句創建觸發器將UNIX_TIMESTAMP()插入到日誌表中
`#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 8 `
這裏之前似乎是在創建觸發器
CREATE TRIGGER after_insert_list
AFTER INSERT ON list FOR EACH ROW
BEGIN
INSERT INTO log (user_id, action, date_log)
VALUES (
NEW.user_id,
NEW.action,
UNIX_TIMESTAMP()
);
END
難道你一定要先改變分隔符? –
@傑克你能否介紹一下嗎?我有點困惑。順便說一下,我正在關注net tuts上的這個教程http://net.tutsplus.com/tutorials/databases/introduction-to-mysql-triggers/ – ianace
你可以在[manual](http: //dev.mysql.com/doc/refman/5.0/en/trigger-syntax.html) –