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

Reply via email to