Re: mysql_pconnect & mysql_connect
| From: | jtjohnston | Date: | Thu, 03 Jan 2002 04:40:23 +0000 |
| Subject: | Re: mysql_pconnect & mysql_connect | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-82863@lists.php.net to get a copy of this message | ||
Jim,
Thanks. What I don't really get is what persistent means.
A problem I'm having with my mysql server is that it is a whole bunch of
messages with in the space of 5 minutes like:
020130 16:11:08 C:\PROGRA~1\EASYPHP\MySql\bin\mysqld.exe: Forcing close of
thread 3 user: 'root'
All I have to do is reload the same page a dozen times.
To test out the whole thing I'm replacing all my mysql_pconnect for
mysql_connect and adding mysql_close to force a closure of the connection.
Scripts just didn't seem to be closing. Hence the question. It's supposed to be
persistent only until the script finishes, but I can prove otherwise. A windows
thing? Who knows?
John
Jeff Sheltren wrote:
> At 11:09 PM 1/2/2002 -0500, jtjohnston wrote:
> >What is the difference between:
> >
> >$myconnection = mysql_connect($server,$user,$pass);
> >and
> >$myconnection = mysql_pconnect($server,$user,$pass);
> >
> >I read the faq.
>
> mysql_pconnect creates a persistent connection to the server... check here:
> http://www.php.net/manual/en/function.mysql-pconnect.php
>
> -Jeff