Retrieving rows matched when using UPDATE in PHP/MySQL
| From: | John Paulsson | Date: | Sat, 24 Nov 2001 12:55:52 +0000 |
| Subject: | Retrieving rows matched when using UPDATE in PHP/MySQL | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-14568@lists.php.net to get a copy of this message | ||
When I manually do an update using MySQL I get extended query result like "Rows matched", "ChangeD" and "Warnings". See example below:
"
UPDATE Foo SET bar = 'value' WHERE ID = 666;
Query OK, 0 rows affected (0.00 sec)
Rows matched: 1 Changed: 0 Warnings: 0
"
How do I retrieve these values using PHP and the MySQL lib? (I'm especially interested in the "Rows matched" value since the Rows affected function isn't enough to determine why an update resulted in 0 rows changed).
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp