Re: Redirecting DBI output
You need to take a look at the documentation for DBI. The connect() subroutine expects a data source for the first parameter, a username as the second parameter and the password for the third. The fourth parameter is the hash reference with all of the options (like PrintWarn, AutoCommit, etc). If you are on a Unix system, you can read the DBI manual with the command:
man DBI
Here is an example:
$database = "my_database";
$user = "db_user";
$pass = "db_pass";
$dsn = "DBI:mysql:database=$database";
$dbh = DBI->connect($dsn, $user, $pass, {AutoCommit=>1, PrintWarn=>0});
-Dave
Subject
Written By
Posted
Re: Redirecting DBI output
February 01, 2007 07:42AM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.