note 71496 deleted from function.session-set-save-handler by danbrown

From: Date: Sun, 23 Jan 2011 16:16:49 +0000
Subject: note 71496 deleted from function.session-set-save-handler by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-176037@lists.php.net to get a copy of this message
Note Submitter: Jonathan Zylstra ---- 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.

« previous php.notes (#176037) next »