On Sunday 11 July 2004 10:03, bruce wrote:
> i'm trying to get a better understanding of how to implement persistent
> connections with mysql in either perl/php
>
> basically i'm trying to solve the issue of whether a web app has to
> essentially perform a new mysql_connect on every page that's going to be
> doing any database access.
>
> using mysql_connect apparently creates a resource id that gets destroyed
> when the web page is no longer being used... can the implementation of
> persistent connections resolve this issue, and how does the resourceID get
> passed from page to page.. i'm not able to get the Session vars to contain
> the resourceID...

I think it hinges on what you're trying to do. Why do you need to store the 
resource_id in a session? IE what you trying to achieve? If it's simply a 
case of trying to eliminate the latency in establishing a connection then 
have a look at mysql_pconnect().

BTW have you read manual > Persistent Database Connections? That will probably 
answer most of your questions.

-- 
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
------------------------------------------
/*
He who laughs last hasn't been told the terrible truth.
*/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to