note 94495 modified in function.mysql-affected-rows by danbrown

From: Date: Mon, 09 Nov 2009 16:25:57 +0000
Subject: note 94495 modified in function.mysql-affected-rows by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-162666@lists.php.net to get a copy of this message
Just a note: [you should] check for a mysql_affected_rows() return value of -1. If a series of queries were run as a transaction and one query failed, the logic in the foreach loop of the transaction() method in class MySQLDB will not issue a ROLLBACK. It may also be slightly more efficient to stop processing queries on the first failure. --was-- Just a note that the example provided by EToS does not check for a mysql_affected_rows() return value of -1. If a series of queries were run as a transaction and one query failed, the logic in the foreach loop of the transaction() method in class MySQLDB will not issue a ROLLBACK. It may also be slightly more efficient to stop processing queries on the first failure. http://php.net/manual/en/function.mysql-affected-rows.php

« previous php.notes (#162666) next »