note 14944 deleted from function.mysql-pconnect by jimw
| From: | jimw@php.net | Date: | Fri, 07 Dec 2001 01:46:37 +0000 |
| Subject: | note 14944 deleted from function.mysql-pconnect by jimw | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-21778@lists.php.net to get a copy of this message | ||
Beware that mysql does not consider the selected database a part of the persistent connection. Try
this:
open persistent connection handle a
select database x
open persistent connection handle b
select database y
perform query q using handle a
You'd expect query q to use database x, in fact mysql will use database y (because it was
selected last).
Of course, a quick workaround is selecting the database before each query. However, the manual is
contradictory about this (see persistent connections section). For more information see the
discussion on bug #12885.
Stefan