Re: Sessions
| From: | Jim Lucas | Date: | Mon, 15 Sep 2008 16:52:38 +0000 |
| Subject: | Re: Sessions | ||
| References: | 1 2 3 4 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-280196@lists.php.net to get a copy of this message | ||
Stut wrote:
> On 15 Sep 2008, at 16:20, Thodoris wrote:
>>> Also just to throw this out, you can also use the
>>> session_set_save_handler
>>> function. This will let you store your sessions wherever you see
>>> fit. file
>>> system, database, etc. Comes in handy when you're on multiple web
>>> servers.
>>>
>>> http://us2.php.net/session_set_save_handler
>>>
>>>
>> Living to learn every single day. Although I find this feature very
>> useful (storing session data in a database for e.g. mysql) I didn't
>> find any good example in the manual or anywhere near using it.
>>
>> Can anyone enlighten me on this ?
>
> http://stut.net/blog/2008/07/20/mysql-sessions/
>
> -Stut
>
Stut,
I have a question about your Read() method.
You are initializing a variable called $retval, but then doing nothing with it.
Then you are returning the result handler whether is it a db handle or a
result set. Also, you are running mysql_free_result on that result variable
before returning it.
Plus, what does the ampersand before the method name do for you?
Thanks
--
Jim Lucas
"Some men are born to greatness, some achieve greatness,
and some have greatness thrust upon them."
Twelfth Night, Act II, Scene V
by William Shakespeare