I have a question about connecting to mysql while using strict and required files.
I start the executed file with:
$dbh = DBI->connect("DBI:mysql:test:localhost")
But whenever I try and call the $dbh variable in the required file:
$sth = $dbh->prepare
I get errors, so I have to connect again. I think this is probably very inefficient. Any ideas what to do?
I start the executed file with:
$dbh = DBI->connect("DBI:mysql:test:localhost")
But whenever I try and call the $dbh variable in the required file:
$sth = $dbh->prepare
I get errors, so I have to connect again. I think this is probably very inefficient. Any ideas what to do?