perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Octavian Rasnita" <orasn...@gmail.com>
Subject Using Apache::DBI
Date Mon, 08 May 2006 12:46:36 GMT
Hi,

I thought the best way of using Apache::DBI is to put the following code in
the startup.pl script:

use Apache::DBI ();
Apache::DBI->connect_on_init('DBI:mysql:database=database_name;host=10.50.28
.37', 'user', undef, {PrintError => 1, RaiseError => 0, AutoCommit => 1});
use DBI ();

But I understand that it is better to disconnect from the database after the
server starts or to connect to the database only after the server starts.

Can you tell me if this is the correct way, or I will need to use another
method?

Thank you.

Teddy


Mime
View raw message