| List: | MySQL and Perl | « Previous MessageNext Message » | |
| From: | Jochen Wiedmann | Date: | July 23 2001 9:31am |
| Subject: | Re: multiples statement handlers ($sth) together | ||
| View as plain text | |||
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
| Thread | ||
|---|---|---|
| • multiples statement handlers ($sth) together | Raul Dias | 20 Jul |
| • RE: multiples statement handlers ($sth) together | Robert Goff | 20 Jul |
| • Re: multiples statement handlers ($sth) together | Jochen Wiedmann | 21 Jul |
| • RE: multiples statement handlers ($sth) together | Robert Goff | 22 Jul |
| • Re: multiples statement handlers ($sth) together | Jochen Wiedmann | 21 Jul |
| • Re: multiples statement handlers ($sth) together | Raul Dias | 21 Jul |
| • RE: multiples statement handlers ($sth) together | Robert Goff | 22 Jul |
| • Re: multiples statement handlers ($sth) together | Jochen Wiedmann | 23 Jul |
| • connection pool via connect_cached | Rajeev Rumale | 26 Jul |
| • Re: connection pool via connect_cached | Jochen Wiedmann | 26 Jul |
| • Re: multiples statement handlers ($sth) together | Raul Dias | 24 Jul |
