Question

I know that my question is related to transactions or tables lock, but I could not able to manage it. My PHP application has to select some values from a table then it has to loop through the results to update some values in the same result. I want the application to stop any user select when there is a select query is operating till the loop is completed.

I used lock tables write, but it prevented the application to do the update. My application is built on CakePHP 1.2.11.

Was it helpful?

Solution

I think something is wrong because your script should be able to UPDATE data on the table while it is WRITE locked for the users, check this URL and I hope it would help. When and how to lock tables

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top