You are here: connection specific question « PHP Programming Language « IT news, forums, messages
connection specific question

Posted by Marcus on 06/19/07 23:09

Hello,

Whenever the PHP documentation references the optional link_identifier
parameter in many mysql related functions (such as mysql_query,
mysql_insert_id, etc.), it says:

"The MySQL connection. If the link identifier is not specified, the last
link opened by mysql_connect() is assumed. If no such link is found, it
will try to create one as if mysql_connect() was called with no
arguments. If by chance no connection is found or established, an
E_WARNING level warning is generated."

I know that functions such as mysql_insert_id are connection specific,
but I have not been able to find any info explicitly stating that it is
also connection specific when link_identifier is omitted. I am about
99% sure that it would still be connection specific because otherwise
these functions would be pretty useless, but could someone please
confirm this?

I just want to avoid the scenario where persons A and B are accessing
the same script, but by the time person A runs mysql_insert_id (or some
other mysql function), person B's connection is technically "the last
link opened by mysql_connect()". In other words, I want to make sure
that I can omit the link_identifier and still be confident that
different connections will not affect each other.

Thanks very much in advance.

 

Navigation:

[Reply to this 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

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