MySQL Forums
Forum List  »  Triggers

need help about trigger
Posted by: lam huy
Date: November 13, 2011 01:26AM

CREATE TRIGGER trgUpdateVisitedUser BEFORE INSERT ON ci_sessions FOR EACH ROW
BEGIN
INSERT INTO stats (tkrVisit)
SELECT ci_sessions.user_data FROM ci_sessions ORDER BY last_activity DESC LIMIT 1
END

#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 'END' at line 5

Thanks.

Options: ReplyQuote


Subject
Views
Written By
Posted
need help about trigger
1668
November 13, 2011 01:26AM
1064
November 13, 2011 09:47PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.