On Mon, 21 Feb 2000, Brendan W. McAdams wrote:

> I found some info on Apache::DBI in the Mod_Perl developers guide that may
> help.  Basically though I globalised $dbh and then made my connection code
> this:
> 
> $dbh ||= DBI->connect("dbi:mysql:$database","$db_user","$db_pass");

        Unless I'm misreading the Apache::DBI manual page, this is
        completely unnecessary.  Apache::DBI makes persistent
        connections transparent so you can call connect() and
        disconnect() as normal.  You don't need to do one-time
        initializations, global variables, or anything.

        - Paul

Reply via email to