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

 ID:          50650
 Updated by:  j...@php.net
 Reported by: robert_xp at gmx dot net
 Summary:     mysql_matched_rows
-Status:      Open
+Status:      Wont fix
 Type:        Feature/Change Request
-Package:     Feature/Change Request
+Package:     *General Issues
 PHP Version: 5.3.1

 New Comment:

Not everything needs a function in PHP.


Previous Comments:
------------------------------------------------------------------------
[2010-01-04 12:46:39] u...@php.net

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

------------------------------------------------------------------------
[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/bug.php?id=50650&edit=1

Reply via email to