mysql> select bar, baz from foo;
+------+-------+
| bar | baz |
+------+-------+
| a | qux |
| b | qux |
| c | qux |
| d | other |
+------+-------+
4 rows in set (0.00 sec)
mysql> update foo set bar = 'b' where baz = 'qux';
Query OK, 2 rows affected (0.02 sec)
Rows matched: 3 Changed: 2 Warnings: 0
mysql> select row_count();
+-------------+
| row_count() |
+-------------+
| 2 |
+-------------+
1 row in set (0.00 sec)
But as we are discussing, you can't apparently get row_count() to return the changed rows with DBD::mysql.
The way forward always starts with a minimal test.
|