note 27499 added to function.mysql-affected-rows

From: Date: Sun, 08 Dec 2002 23:04:19 +0000
Subject: note 27499 added to function.mysql-affected-rows
Groups: php.notes 
Request: Send a blank email to php-notes+get-40547@lists.php.net to get a copy of this message
If you need to know the actual count of rows, even if some update changed nothing add a field count int(11) and add one on every update, like in: mysql_query("update table set count=count+1, ..."); if (mysql_affected_rows()==0) { mysql_query("insert into table ..."); } -- http://www.php.net/manual/en/function.mysql-affected-rows.php http://master.php.net/manage/user-notes.php?action=edit+27499 http://master.php.net/manage/user-notes.php?action=delete+27499 http://master.php.net/manage/user-notes.php?action=reject+27499

« previous php.notes (#40547) next »