|
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]
|