If you weren't using Apache::DBI, then your code:
my $DBH || DBI->connect( "dbi:mysql:localhost", "rentsaver", "root" ) ;probably should have been:
$DBH ||= DBI->connect( "dbi:mysql:localhost", "rentsaver", "root" ) ;
You lost the equal part of the assignment operator. This code may create a connection, but it doesn't set $DBH.
But since you are using Apache::DBI, it should probably be:
$DBH = DBI->connect( "dbi:mysql:localhost", "rentsaver", "root" ) ;
Also, your startup file need only use Apache::DBI, not DBI; Apache::DBI loads DBI, then overrides the connect and discoonnect methods to implement the caching for you.
--Bob Niederman, http://bob-n.comIn reply to Re: accessing Apache::DBI 'cached connections'
by bobn
in thread accessing Apache::DBI 'cached connections'
by geektron
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |