This is a simplified description of the performance, but .. There is a table with a list of goods. It is necessary one by one to find the goods corresponding to a certain condition, to perform operation A on it and to write 'A' in the operation_done column. After that, calculate all products with operation_done = 'A' and carry out operation B. The problem is that the scripts executing the operations A and B are started by the crown and an overlay may occur. How to make so that operation B "waited" access to the table, while operation A is performed?
PDO beginTransaction () I do not think that solves the problem.