Hi all,
I have a question that I think I already know the answer too, but thought I'd inquire to see if anybody else knew something I didn't. It wouldn't be the first time...
I want to use mysql_pconnect to set up two links, to the same MySQL server - these links need to be separate, and will be pointed at different databases. Depending on the site, they may or may not be using the same MySQL user, too. The environment I want to set up needs to be able to handle both conditions.
The problem is that when I do something like:
$dbLink = mysql_pconnect ("localhost", "user", "password")
$dbLink2 = mysql_pconnect ("localhost", "user", "password")
They are both really the same link. I wind up with one link with two names. The only way I can see to fix this is to set up two MySQL users, or use mysql_connect. Question, however - anyone have any idea what the performance difference is between using persistent and "normal" connections? If it's negligable, I might as well just use mysql_connect with the "new link" boolean parameter set.