How can I ensure that multiple members making the same choice at the same time don't end up receiving the exact same result, and ultimately try to acquire that position at the same time?
If your field is the PK, inserting the same id will fail. Then you can retry getting an id and inserting the record until it succeeds.
Not sure if it is possible in MySQL, but you can insert through a stored procedure that locks the table while determining the correct id.
pritaeas
Posting Prodigy
9,279 posts since Jul 2006
Reputation Points: 1,173
Solved Threads: 1,457
Skill Endorsements: 86
PK means Primary Key. Making the field unique will also work.
pritaeas
Posting Prodigy
9,279 posts since Jul 2006
Reputation Points: 1,173
Solved Threads: 1,457
Skill Endorsements: 86
Question Answered as of 9 Months Ago by
pritaeas