Re: AW: [PHP4BETA] Re: mysql thing

From: Date: Tue, 28 Dec 1999 22:22:18 +0000
Subject: Re: AW: [PHP4BETA] Re: mysql thing
References: 1  Groups: php.version4 
Request: Send a blank email to php-version4+get-8627@lists.php.net to get a copy of this message
Tilli Weissenberger wrote: > > That doesn't sound very fool-proof to me. What if 20 People "add" stuff to > one table at the same time, using a persistent DB connection? Who will get > which "auto inc" id? > > regards, Tilli What you are describing can never happen. Here is why: mod_php is a part of the Apache web server. Apache runs several childern simultaneously. When a request is made, it is handled by the first available child. While that child is handling this particular connection, he is not doing anything else for anybody -- he is all yours, so to speak :-) Persistent mysql connection in PHP means that the child does not close the connection when it is done with one request, and will reuse it on subsequent requests. Taking the above into account, you will never see any activity on the mysql connection established by your PHP script between the start and the end of its execution that is not originated by your script. -- Sasha Pachev http://www.sashanet.com

« previous php.version4 (#8627) next »