"Stathy G. Touloumis" wrote: > > > I'm not sure what you mean, really, but perhaps you mean > > dbi_connect_method? > > Did you mean specifying this argument like so ? > > DBI->connect( $driver, $u, $p, { dbi_connect_method=> 'connect' } ); > > I will see if this is what I am looking for. Thanks for the reference : )
this is how i usually do it in startup.pl: #dont declare DBI!!!! use Apache::DBI; # Initialize the database connections for each child Apache::DBI->connect_on_init ("DBI:mysql:database=Ezines;host=localhost", "root","database", { PrintError => 1, # warn() on errors RaiseError => 0, # don't die on error AutoCommit => 1, # commit executes immediately } ); $Apache::DBI::DEBUG = 1; then in my code i just use DBI as i normally would: my $dbh = DBI->connect( 'dbi:mysql(RaiseError=>1,Taint=>1):dbname=database;host=localhost', 'username', 'password', ); my $count = $dbh->selectrow_array( q{ SELECT count(*) FROM Ezines }, {}, ); $dbh->disconnect; if you tail the log file you should see Apache::DBI::DEBUG messages