I am running phpmyAdmin to manage the mysql db. In my php4, I use mysql_pconnect to connec to my db. The manual tells that mysql_pconnect will alway keep the connection alive while mysql_connect will not and the closing task leaves to user. Moreover, mysql_pconnect will check if any connection has already been built, if so the pointer of current connection will be return. I write a piece of code for testing that.
$a=mysql_pconnect();
query("select * from tb where id='3';")
$b=mysql_pconnect();
query("select * from tb where id='34;")
$c=mysql_pconnect();
query("select * from tb where id='5';")
$d=mysql_pconnect();
query("select * from tb where id='6';")
WHY $a != $b != $c != $d ????
The code given above seems ok. However, via phpmyadmin, I see there are at least 8 processes alive. If mysql_pconnect() really always keep one connection, why so many processes there? BTW, if too many proccesses are observed, I found it always fail to query the database even the querying SQL is simple. !!!