ID:          50650
 Updated by:  [email protected]
 Reported By: robert_xp at gmx dot net
 Status:      Open
 Bug Type:    Feature/Change Request
 PHP Version: 5.3.1
 New Comment:

What's the point in coding something that can easily be done in the
user space and expanding an outdated API?


Previous Comments:
------------------------------------------------------------------------

[2010-01-04 12:02:58] robert_xp at gmx dot net

Description:
------------
Sometimes, it is necessary to get the number of matches instead of the
number of affected rows. Matches means for example in an UPDATE, where
no changes were made (0) there could be some matches. There are two
possebilities for that case: an own mysqli_info() parser or a new single
count query. http://www.xarg.org/2009/12/php-hacking/

Reproduce code:
---------------
$res = mysqli_query($h, 'UPDATE something ...');
echo mysql_matched_rows($h);
echo mysql_affected_rows($h);

Expected result:
----------------
1
0

// if there is one row, that has the same value as we want to update

Actual result:
--------------
-


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=50650&edit=1

Reply via email to