mysql_query - does link identifier need to be specified?
Posted: Tue Oct 21, 2003 10:15 am
Hi,
Having read the manual, I'm pretty sure that the answer is no, but could someone confirm that given the connection code below, I don't need to specify a link identifier in subsequent mysql_query calls, even in a multi-user environment. I just want to be sure that when the manual says:
So, if person A creates a link to the database and is assigned a handle, and person B also connects, A's handle won't be confused with B's.
Many thanks
Having read the manual, I'm pretty sure that the answer is no, but could someone confirm that given the connection code below, I don't need to specify a link identifier in subsequent mysql_query calls, even in a multi-user environment. I just want to be sure that when the manual says:
If link_identifier isn't specified, the last opened link is assumed. If no link is open, the function tries to establish a link as if mysql_connect() was called with no arguments, and use it.
Code: Select all
$link = mysql_connect("localhost", "xxxxxx", "xxxxxx") or die("Unable to establish connection<br/>");
mysql_select_db("xxxxxx") or die("mySQL: Unable to select database<br/>");Many thanks