#45080 [NEW]: PDOStatement - Mysql Driver - rowCount
| From: | paul dot cocei at gmail dot com | Date: | Fri, 23 May 2008 13:10:24 +0000 |
| Subject: | #45080 [NEW]: PDOStatement - Mysql Driver - rowCount | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-125215@lists.php.net to get a copy of this message | ||
From: paul dot cocei at gmail dot com
Operating system: CentOS 5.1
PHP version: 5.2.6
PHP Bug Type: Feature/Change Request
Bug description: PDOStatement - Mysql Driver - rowCount
Description:
------------
Because libmysql contains a method named mysql_stmt_num_rows, it is
possible in the mysql PDO driver to return correctly the total count of
rows selected by a SELECT statement.
Right now, the source code for mysql PDOStatement uses
mysql_stmt_affected_rows, which evidentely returns "0" for SELECT queries.
Localization: php-5.2.6/ext/pdo_mysql.c, line 202.
Reproduce code:
---------------
row_count = mysql_stmt_affected_rows(S->stmt);
--
Edit bug report at http://bugs.php.net/?id=45080&edit=1
--
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=45080&r=trysnapshot52
Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=45080&r=trysnapshot53
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=45080&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=45080&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=45080&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=45080&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=45080&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=45080&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=45080&r=support
Expected behavior: http://bugs.php.net/fix.php?id=45080&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=45080&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=45080&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=45080&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=45080&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=45080&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=45080&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=45080&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=45080&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=45080&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=45080&r=mysqlcfg