Will PHPMYSQL transactions be concurrent? suppose there are tables A and B. The premise of inserting data into Table B is to judge table A first. If Table A is determined in the program first, and then data is inserted, concurrency occurs .. If the transaction is made, insert the data and then judge Table A. If the conditions do not match, roll back... & Nbsp; does this solve the problem? does it seem to be still concurrent ?, Will the select... forupd php mysql transaction be concurrent?
Suppose there are tables A and B.
The premise of inserting data into Table B is to judge table A first.
If Table A is determined in the program first, and then data is inserted, concurrency occurs ..
If the transaction is made, insert the data and then judge Table A. If the conditions do not match, roll back...
Can this solve the problem, as if it would still be concurrent?
------ Solution --------------------
Use select... for update
------ Solution --------------------
Discussion
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service