Hi list,

I do a small test on mysql_connect() and mysql_pconnect(),
and discover a strange behaviour.

<?
$cid1 = mysql_pconnect($host,$user,$pass) or die("cant connect1");
$cid2 = mysql_pconnect($host,$user,$pass) or die("cant connect2");
echo $cid1, $cid2;
?>

the output if using mysql_connect():
Resource id #1
Resource id #1
(both resource id are the same, as expected)

the output if using mysql_pconnect():
Resource id #1
Resource id #2
(both resource id are different)

at first I though pconnect() will create 2 different connection
because the printed resource id is different.

But after doing some test (by looking at the mysql processlist) i can
conclude that those two link_identifier are actually the same
(only one link, but with two different id)

the question is, why pconnect() print different resource id,
whereas connect() print the same one?

--
Jimmy
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
You can't quicken the growing of a plant by pulling the leaves



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to