note 49192 added to function.mysql-connect

From: Date: Wed, 19 Jan 2005 16:45:23 +0000
Subject: note 49192 added to function.mysql-connect
Groups: php.notes 
Request: Send a blank email to php-notes+get-83632@lists.php.net to get a copy of this message
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? ---- Manual Page -- http://www.php.net/manual/en/function.mysql-connect.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+49192 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+49192&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+49192&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+49192&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+49192&report=yes&reason=useless Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+49192&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+49192&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#83632) next »