in reply to Re^3: Multiple file handles
in thread Multiple file handles
DBI is the plumbing; DBD::mysql is the fitting. You need both.
From the doc for DBD::mysql (plus your error handling):
Set up all those variables then use that exact code snippet and it should work for you.my $dsn = "DBI:mysql:database=$database;host=$hostname;port=$port"; my $dbh = DBI->connect($dsn, $user, $password) or die "Couldn't connec +t to database: ".DBI->errstr;
Hope this helps!
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^5: Multiple file handles
by MoodyDreams999 (Scribe) on Apr 13, 2023 at 17:26 UTC |