RE: [PEAR-DEV] MDB: Unified DSN Constant
| From: | Lukas Smith | Date: | Sun, 27 Apr 2003 14:51:54 +0000 |
| Subject: | RE: [PEAR-DEV] MDB: Unified DSN Constant | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-15597@lists.php.net to get a copy of this message | ||
> From: Davey [mailto:davey@pixelated-dreams.com]
> Sent: Sunday, April 27, 2003 4:47 PM
> The idea is that rather than every package using MDB requiring the
login
> information for MDB (be that an array or a DSN), MDB should implement
a
> default DSN registration, where a user can define a default DSN for
all
> packages to use, and MDB would put that into a constant for every
> package to use.
>
> It would be able to check for that constant (by implmenting it in MDB
> its name is set in stone, it won't change on a per-package basis as
the
> author feels like it for just their package.
>
> It would allow the package to check the constant and decide to use
that
> or allow the user (or require them) to supply new credentials for
that
> specific package.
>
> I just really hate the idea that a user has to specify a DSN for
*every*
> package that uses MDB.
Why not define your
MY_DEFAULT_DSN constant which you then pass to every package that needs
a dsn?
What might be more feasible is a suggestion that came recently about
making all packages that use M?DB to allow passing of an existing object
instance.
Regards,
Lukas