Reply to Re: mysql_insert_id() is it not problematic?

Your name:

Reply:


Posted by Chris Hope on 01/26/06 23:49

Andy Hassall wrote:

> On Fri, 27 Jan 2006 10:06:58 +1300, Chris Hope
> <blackhole@electrictoolbox.com> wrote:
>
>>> mysql_insert_id() is connection specific, and MySQL connections
>>> aren't shared
>>> between concurrent PHP requests, so this avoids the condition you
>>> describe.
>>
>>What about if persistant connections are used? I'm a little unclear of
>>this myself. Does each PHP thread use a different persistant
>>connection, or can the share them? I would assume the former.
>
> In multiprocess webservers, e.g. Apache 1.3, it's simple - there's a
> completely separate instance of PHP per Apache worker process, each
> with its own persistent connection pool, which will have zero or one
> connection for a given database and credentials. So, there's nothing
> else that can use the connection, since this instance of PHP can only
> run one script at a time.

That's pretty much what I thought. Thanks for the clarification.

[snip]

--
Chris Hope | www.electrictoolbox.com | www.linuxcdmall.com

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация