cc:
Subject: RE: Saving a connection string
The first example passes 3 parameters to connect() while the second
example
only passes one. Besides which, I wouldn't recommand storing user/pass
into
such an array (which is what you would need). Better store the $dbh and
clone that
n: David Dooling [mailto:[EMAIL PROTECTED]
> Verzonden: maandag 31 maart 2003 16:51
> Aan: '[EMAIL PROTECTED]'
> Onderwerp: Re: Saving a connection string
>
>
> On Mon, Mar 31, 2003 at 09:44:37AM -0500, Jefferies, Brian wrote:
> > Why does this example work...
> &g
On Mon, Mar 31, 2003 at 09:44:37AM -0500, Jefferies, Brian wrote:
> Why does this example work...
>
> $dbh = DBI->connect("DBI:mysql:database=$database:host=$hostname",
> $user, $password)
>
> ...but this doesn't...
>
> $connect_string = qq("DBI:mysql:database=$database:host=$hostna
$connect_string)
ERROR> Can't connect("DBI:mysql:database=:host=localhost", , ),
ERROR> no database driver specified and DBI_DSN env var not set at ./test.pl
line 29
Is there a better method for saving a connection string?
Thanks in advance,
-Brian