Gossamer Forum
Home : Products : Others : MySQLMan :

MySQL connections problem

Quote Reply
MySQL connections problem
In Perl, is it possible, the connection to the SQL server will not be closed when the execution of the script ends. Instead, the link will remain open for future use. When connecting, it would first try to find a (persistent) link that's already open with the same host. If one is found, an identifier for it will be returned instead of opening a new connection? I know there is a function can do like this in PHP (mysql_pcconnect vs mysql_connect), but don't how to do in Perl.


Quote Reply
Re: MySQL connections problem In reply to
Hi,

With CGI, the process is destroyed after the script is run so persistant connections are not possible. You need to use mod_perl if you want persistant connection (and then use Apache::DBI and it's transparent).

Cheers,

Alex

--
Gossamer Threads Inc.
Quote Reply
Re: MySQL connections problem In reply to
Thanks Alex:)