Re: Major Bug in multiple MySQL Connections?

From: Date: Mon, 22 Apr 2002 18:06:58 +0000
Subject: Re: Major Bug in multiple MySQL Connections?
References: 1 2  Groups: php.dev 
Request: Send a blank email to php-dev+get-83155@lists.php.net to get a copy of this message
On Mon, Apr 22, 2002 at 07:19:48PM +0200, Melvyn Sopacua wrote : > At 17:27 22-4-2002, Rasmus Lerdorf shared with all of us: > > >The proper way to do this in your generalized app would be to either force > >a mysql_select_db on each query to make sure you are talking to the right > >one, or if you prefer do a select database() query to see which is the > >current one. > > ??? > If this is the case, then don't deprecate mysql_db_query. > > If keeping track of dbconnection is such a problem, simply hardcode the > database in the query. Then it doesn't matter what db is currently selected. > > >> > > Also, honestly, I do not understand why PHP _forces_ you to > >> > > reuse the same links. Until the patch/optional parameter the > >> > > only workaround was to use another username (doh!). > > Actually - using different variables, with different hostnames already work. > Ie: localhost / 127.0.0.1 are different. I use it in a forum app, where > registration is in centralized in another database. I can use IP, short > hostname, FQDN, so three at one time if I want to. Of course this works, the extension hashes up the user/pass/host exactly as provided by the user. Any difference in the characters would also lead to a new connection (double-doh!) . . . -- Please always Cc to me when replying to me on the lists. GnuPG Key: http://guru.josefine.at/~mfischer/C2272BD0.asc "Mind if I MFH ?" "What QA did you do on it?" "the usual?" "ah... none :)"

« previous php.dev (#83155) next »