Good day.
I have tricky problem which I'm struggling to get right.
I have the following situation:
1) InnoDB database
2) There is a table "licences" which has encrypted string "lics" in it.
3) I have code which grabs that string, decrypts it, deducts a license, encrypts it again, updates that table with new encrypted string.
The problem is that if 5 users execute this code at the same time, only 1 license deduction happens.
How can I get this right so all 5 licenses are deducted even when 5 users run that code at exactly the same time?
Thanks.
I have tricky problem which I'm struggling to get right.
I have the following situation:
1) InnoDB database
2) There is a table "licences" which has encrypted string "lics" in it.
3) I have code which grabs that string, decrypts it, deducts a license, encrypts it again, updates that table with new encrypted string.
The problem is that if 5 users execute this code at the same time, only 1 license deduction happens.
How can I get this right so all 5 licenses are deducted even when 5 users run that code at exactly the same time?
Thanks.