Re: session and mysql connection identifier

From: Date: Wed, 21 Jul 2004 07:29:23 +0000
Subject: Re: session and mysql connection identifier
Groups: php.general 
Request: Send a blank email to php-general+get-191280@lists.php.net to get a copy of this message
What he is really looking for is connection pooling. Do a google and see if you can find 'mysql connection pooling php'. It is persistent connections across page accesses, which PHP does not do natively AFAIK. Jason Wong <php-general@gremlins.biz> wrote: <quote--------------------------------------------------------> On Wednesday 21 July 2004 13:47, mukta telang wrote:
I want to use mysql persistent connection to connect to mysql and use the connection identifier or handle in subsequent pages/scripts. So in script1.php I have session_start(); session_register('conn'); HTTP_SESSION_VARS['conn']=mysql_pconnect(...); and in script2.php I have, echo $conn; and I always get "1" as output and not Resource#.. as expected..
You can't pass/use "resource IDs" across different pages/scripts. Please read the manual > Persistent Database Connections to clear up some misconceptions about persistent connections. Also follow ups to this should be sent to the php-db list. </quote--------------------------------------------------------->

« previous php.general (#191280) next »