MySQL Forums
Forum List  »  Triggers

Re: How can I create a trigger that increments on read?
Posted by: Roland Bouman
Date: August 19, 2005 01:40PM

Hi Greg,

as you posted on triggers forum, I immediately assumed you had some MySql >= 5 version. Triggers, Views and Stored procedures / functions are all >= 5 features. So, my little trick definitely needs >= 5.

I'm glad you provided the extra info though. Have you considered using InnoDB tables in order to use the transaction technology supported by MySQL? I recommend you investigate wheter you can pull it of using just 'ordinary' transactions.
Please start reading here:

http://dev.mysql.com/doc/mysql/en/ansi-diff-transactions.html
http://dev.mysql.com/doc/mysql/en/innodb-overview.html
http://dev.mysql.com/doc/mysql/en/innodb-transactions-with-different-apis.html

and see if it applies to your case. I would have to know more about your specific application and (re)read all this stuff myself too to give a sensible answer. So, read a little and let us know if it solves your problem.

Good luck!

Options: ReplyQuote




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.