Does php fork standalone mysql queries or wait for them?
October 16, 2009 7:21 AM Subscribe
How does PHP handle mysql requests (in regard to time and 'forking')
posted by twine42 to computers & internet (4 answers total)
A piece of PHP code does a mysql INSERT. Assuming that there are no further mysql commands (ie, another SQL query or a request for the insert id), does PHP wait for the mysql to be completed before it continues with the rest of the PHP? Or does it wander on ahead?
The reason I ask, is that I have a server that is (occasionally) stacking a load of slow queries.
I've also got a system that does inserts a record, then redirects the browser to a different page which looks for a modified records.
I'm getting reports of a bug that could be a race condition, but I'd assumed that PHP was waiting for a response from mysql...