note 71496 added to function.session-set-save-handler
| From: | JonathanZylstra at osu1 dot php dot net | Date: | Sat, 02 Dec 2006 01:58:18 +0000 |
| Subject: | note 71496 added to function.session-set-save-handler | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-120226@lists.php.net to get a copy of this message | ||
In response to korvus at kgstudios dot net
11-Jun-2005 05:34:
Actually, using MySQL REPLACE, and getting the number of
affected rows = 2, means that one row was being deleted,
and one row being inserted.
That would happen if your session id was already in the database, and you write to it using
'REPLACE' ... it deletes the old session data, and REPLACE's it with the updated
session data, thus resulting in two affected rows.
See:
http://dev.mysql.com/doc/refman/4.1/en/replace.html
I would be careful in assuming that the 'write' callback is called twice because of the
behavior of your SQL code.
----
Server IP: 64.71.164.2
Probable Submitter: 66.223.140.2
----
Manual Page -- http://www.php.net/manual/en/function.session-set-save-handler.php
Edit -- https://master.php.net/note/edit/71496
Del: integrated -- https://master.php.net/note/delete/71496/integrated
Del: useless -- https://master.php.net/note/delete/71496/useless
Del: bad code -- https://master.php.net/note/delete/71496/bad+code
Del: spam -- https://master.php.net/note/delete/71496/spam
Del: non-english -- https://master.php.net/note/delete/71496/non-english
Del: in docs -- https://master.php.net/note/delete/71496/in+docs
Del: other reasons-- https://master.php.net/note/delete/71496
Reject -- https://master.php.net/note/reject/71496
Search -- https://master.php.net/manage/user-notes.php