[Vmail-discuss] INSERT DSN HERE
Chris Lightfoot
chris@xxxxxxxxxxxxx
Fri, 13 Apr 2001 03:28:25 +0100
On Thu, Apr 12, 2001 at 03:28:01PM -0500, Jeff wrote:
> what goes here ? (example)
>
> # get database handle
> $dbh = DBI->connect(); # INSERT YOUR DSN HERE
The DSN of the database, obviously.
man DBD::mysql would help you here. I quote:
| SYNOPSIS
| use DBI;
|
| $driver = "mSQL"; # or "mSQL1";
| $dsn = "DBI:$driver:database=$database;host=$hostname";
|
| $dbh = DBI->connect($dsn, undef, undef);
|
| or
|
| $driver = "mysql";
| $dsn = "DBI:$driver:database=$database;host=$hostname;port=$port";
|
| $dbh = DBI->connect($dsn, $user, $password);
So, a good guess would be
$dbh = DBI->connect("DBI:mysql:database=DATABASE;host=localhost;user=USER;password=PASSWORD");
--
Chris Lightfoot -- www.ex-parrot.com/~chris/
``... the reason soldiers retire early is that,
at about age 40 - 45, they realise that war is dangerous.'' (anon.)