MySQL Forums
Forum List  »  Triggers

Re: Syntax error in trigger
Posted by: Gabriella Pepe
Date: August 14, 2017 05:47AM

Well, I posted my question in the 'newbie' section (then it was moved), so I hoped someone with experience would teach me something I could not find myself.

The purpose of assigning even that query to a variable was simply readability (performance is unimportant in my context).

Of course, you were right: I added a right paren. I know an editor could find this kind of stupid things, but, as a developer (NOT a db expert in my case), I would really benefit from more detailed errors (if you search a little, eg. on StackOverflow, you can find #1064 errors for about anything...).

Finally, I replaced post_id with NEW.post_id.

The trigger compiled without errors, I hope it will work the way I imagined. :-)

Thanks very much for your time and patience

Options: ReplyQuote


Subject
Views
Written By
Posted
1725
August 11, 2017 03:37AM
645
August 11, 2017 10:57AM
837
August 12, 2017 02:47AM
640
August 12, 2017 07:49AM
774
August 13, 2017 12:15AM
847
August 13, 2017 12:35AM
787
August 13, 2017 11:09AM
Re: Syntax error in trigger
694
August 14, 2017 05:47AM
707
August 14, 2017 10:17AM


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.