Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:22371 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 40676 invoked by uid 1010); 13 Mar 2006 16:05:59 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 40660 invoked from network); 13 Mar 2006 16:05:59 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 13 Mar 2006 16:05:59 -0000 X-Host-Fingerprint: 195.14.38.100 maximus.artstyle.net Received: from ([195.14.38.100:44624] helo=maximus.artstyle.net) by pb1.pair.com (ecelerity 2.0 beta r(6323M)) with SMTP id 74/7B-55982-66895144 for ; Mon, 13 Mar 2006 11:05:58 -0500 Received: from [212.118.39.190] (helo=NICK) by maximus.artstyle.net with esmtpa (Exim 4.43) id 1FIpYQ-0000R1-Bw from nickm@tbms.ru for internals@lists.php.net; Mon, 13 Mar 2006 19:05:54 +0300 To: Date: Mon, 13 Mar 2006 19:05:54 +0300 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Mailer: Microsoft Office Outlook, Build 11.0.6353 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2670 Thread-Index: AcZGuAFIi1NW9Sp9TH6Cl5t41cp3qg== Message-ID: Subject: Multiple MySQL Connections From: nickm@tbms.ru ("Nick Mitin") I was trying to create 2 mysql connections. $l1 =3D mysql_pconnect(=E2=80=9Clocalhost=E2=80=9D, = =E2=80=9Cuser=E2=80=9D, =E2=80=9Cpass=E2=80=9D); mysql_select_db(=E2=80=9Cdb1=E2=80=9D, $l1); $l2 =3D mysql_pconnect(=E2=80=9Clocalhost=E2=80=9D, = =E2=80=9Cuser=E2=80=9D, =E2=80=9Cpass=E2=80=9D); mysql_select_db(=E2=80=9Cdb1=E2=80=9D, $l2); The $l1 and $l2 now contains different resource ids (#1, #2), but mysql_query(=E2=80=9Cselect * from table=E2=80=9D, $l1) somehow uses the = second connection. If I change the username in second connection to user1 (assuming user1 = as valid login) $l2 =3D mysql_pconnect(=E2=80=9Clocalhost=E2=80=9D, = =E2=80=9Cuser1=E2=80=9D, =E2=80=9Cpass=E2=80=9D); mysql_select_db(=E2=80=9Cdb1=E2=80=9D, $l2); everything is fine. I found this pretty strange. ________________________________________ Nick Mitin Borzov-Mitin Solutions, The // http://tbms.ru=20