MySQL Forums
Forum List  »  General

Re: Incrementing counters
Posted by: Peter Brawley
Date: August 05, 2015 03:01PM

The most foolproof method for each instance of needing a unique counterid, ..

begin transaction
in the counters table find the next sequential value for the given table
store it in the counters table along with the name of the target table
insert it in the target table
commit or rollback on failure

Options: ReplyQuote


Subject
Written By
Posted
August 05, 2015 02:27PM
Re: Incrementing counters
August 05, 2015 03:01PM
August 05, 2015 06:00PM
August 07, 2015 07:08AM


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.