note 49192 rejected from function.mysql-connect by sean

From: Date: Wed, 19 Jan 2005 16:48:10 +0000
Subject: note 49192 rejected from function.mysql-connect by sean
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-83633@lists.php.net to get a copy of this message
Note Submitter: moc.liamtoh@eiwof ---- Maybe someone can shed some light on this, I have one MySQL db hosted on localhost, and another hosted on a separate server. My web app gets records from the localhost DB and then uses extra information from the remote DB to create displayable fields, (like taking a userID and getting the user's name from the remote DB). It seems like I am thrashing though, because during the script I call mysql_connect(localhost.....) and then I will call mysql_connect(remoteserver......) and then go back to mysql_connect(localhost.....). The doc says here if I'm connected it will return the already opened resource ID, but does that still work in this case or does PHP see that I'm connected to remoteserver and think I don't have a connection to localhost, so it opens a new one? Any way to get around this? mysql_pconnect doesn't seem like the correct option, maybe I'm mistaken?

« previous php.notes (#83633) next »