Robert Goff wrote:
Having different $dbhs for each thread means that I would need
to connect to the database in each thread, right? Can't I have
different $dbh's sharing the same connection?
A $dbh, the return value of the DBI->connect() method, is mapped one-to-one
with a database connection. As far as I know, there is no way to have two
separate $dbh objects without two separate database connections.
Thats correct. Using one dbh per thread is definitely recommended.
With MySQL it is no problem to connect/disconnect. Besides, you
can always use a connection pool via connect_cached.
Bye,
Jochen