note 42031 rejected from function.mysql-affected-rows by betz

From: Date: Fri, 30 Apr 2004 08:05:20 +0000
Subject: note 42031 rejected from function.mysql-affected-rows by betz
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-69026@lists.php.net to get a copy of this message
Note Submitter: Gary W ---- I don't know if this behavior is specific to any particular version of MySQL or PHP, but when I use a sql-based session manager, mysql_affected_rows() returns 0 even when I force the timestamp to update. For example, both of the following queries will cause mysql_affected_rows() to return 0 if mydata hasn't changed -- even though the timestamp in the record DOES, in fact, get updated: UPDATE sessions SET mytimestamp=NULL,mydata='...' WHERE sessionid='...' UPDATE sessions SET mytimestamp=NOW(),mydata='...' WHERE sessionid='...' I can't tell if this is a bug in PHP's session handling or something in MySQL. The only cure seems to be to connect using CLIENT_FOUND_ROWS.

« previous php.notes (#69026) next »