Re: DB: multiple connections or determining if there is an existing connection
| From: | Lukas Smith | Date: | Tue, 18 Jan 2005 10:43:55 +0000 |
| Subject: | Re: DB: multiple connections or determining if there is an existing connection | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-16990@lists.php.net to get a copy of this message | ||
Wesley Furgiuele wrote:
Hi. Is there a way, using DB::connect(), to open multiple connections to a database under the same user?No.
If not, does anyone have a method for determining if (1) there is already an open connection, or (2) that a subsequent call toyes .. check the connection property.
DB::connect() has returned a previously-opened connection?not that I can think of .. some extensions have a tendency to automagically reuse connections I guess your best hope is to write your own factory method that keeps an array of all open connections keyed by the dsn. regards, Lukas