not sure what you mean by hijacking...

simply did a cut/past for a new topic..

but thanks for the reply... guess i'll have to investigate persistent
connections.. but i'm still confused as to why a value that i put into the
session variable seems to get reset to '0' when i use the session var in
another page....

ideas/comments welcome..

thanks..

-bruce


-----Original Message-----
From: Marek Kilimajer [mailto:[EMAIL PROTECTED]
Sent: Saturday, July 10, 2004 4:42 PM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] mysql and session vars...


Please do not hijack threads.

bruce wrote:
> hi...
>
> if i create a site that hits a back mysql db...
>
> i don't want to do a mysql_connect for every page that has to access the
db.
> so the question is where should the mysql_connect occur. also, if i were
to
> do it once when the app starts, is the connection more or less maintained
> throught the life of the app.

You have to connect to mysql on every page, it's not possible to store
the connection in session. That's how it works.

>
> an additional question. the resource identifier is required to initiate a
> given php mysql function. i would assume that the resource identifier
should
> probably be stored in some session var....
>
> searching mysql/php/google didn't result in clarfification for these
> issues...
>
> comments/criticisms/thoughts are welcome...
>
> thanks
>
> -bruce
>

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

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

Reply via email to