Re: session and mysql connection identifier

From: Date: Wed, 21 Jul 2004 05:58:21 +0000
Subject: Re: session and mysql connection identifier
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-191270@lists.php.net to get a copy of this message
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. -- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * ------------------------------------------ Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general ------------------------------------------ /* Tact is the ability to tell a man he has an open mind when he has a hole in his head. */

« previous php.general (#191270) next »