hello koders,
there is a value stored in mysql that is 30
i have added a query : get value from mysql + add 40 in it and the store it in mysql again
so that it should be 30 + 40 = 70 and then store 70 in mysql
but when two users runs that query one by one or have difference for about 1 2 secpnds
then it is
1st time = 30 + 40 = 70
2nd time = 70 + 40 = 110
this is ok
but when the two users runs the query at the same time then
1st time = 30 + 40
also 2nd time = 30 + 40
both the times mysql get the same value and add 40 in it and stored it
so this is the question when someone runs a query at the same time mysql get the same value that is 30 .
can we solve this or can we make query async
i didnt found solution on google