Re: do pear packages create their own seperate DB connections?
| From: | Martin Jansen | Date: | Tue, 22 Apr 2003 14:12:52 +0000 |
| Subject: | Re: do pear packages create their own seperate DB connections? | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-15328@lists.php.net to get a copy of this message | ||
On Tue Apr 22, 2003 at 03:0905PM +0200, Jeroen Houben wrote:
> A lot of packages use DB (and in the future hopefully MDB) and they all
> need a DSN as a constructor parameter. IMO it would be nice if packages
> like Auth and Tree etc etc would also accept a reference to an existing
> connection.
At least PEAR::Auth is already capable of that:
$dbh = DB::connect("...");
$a = new Auth("DB", &$dbh);
--
- Martin Martin Jansen
http://martinjansen.com/