From 211289467c7a61fadc5c6d508bfa7c041dd99489 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Gerg=C5=91=20Tisza?= Date: Fri, 16 Aug 2019 14:06:10 +0200 Subject: [PATCH] Fix IDatabase::affectedRows() documentation Bug: T229456 Change-Id: I992e81e5dbcd9db74644b2990044cf685567db5a --- includes/libs/rdbms/database/IDatabase.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/includes/libs/rdbms/database/IDatabase.php b/includes/libs/rdbms/database/IDatabase.php index 6b028679ee..11a55952e8 100644 --- a/includes/libs/rdbms/database/IDatabase.php +++ b/includes/libs/rdbms/database/IDatabase.php @@ -452,8 +452,10 @@ interface IDatabase { public function lastError(); /** - * Get the number of rows affected by the last write query - * @see https://www.php.net/mysql_affected_rows + * Get the number of rows affected by the last write query. + * Similar to https://www.php.net/mysql_affected_rows but includes rows matched + * but not changed (ie. an UPDATE which sets all fields to the same value they already have). + * To get the old mysql_affected_rows behavior, include non-equality of the fields in WHERE. * * @return int */ -- 2.20.1