From: Operating system: Linux PHP version: 5.3.6 Package: *Database Functions Bug Type: Bug Bug description:PDO::FECTH_KEY_PAIR doesn't work as expected
Description: ------------ If you try to use $stmt->fetchAll(PDO::FETCH_KEY_PAIR) on result set with more than two columns, error occurs: Warning: PDOStatement::fetchAll() [pdostatement.fetchall]: SQLSTATE[HY000]: General error: PDO::FETCH_KEY_PAIR fetch mode requires the result set to contain extactly 2 columns. But documentation says: PDO::FETCH_KEY_PAIR (integer) Fetch into an array where the 1st column is a key and all subsequent columns are values There are should be no limit for columns. Thanks Expected result: ---------------- No error Actual result: -------------- Warning: PDOStatement::fetchAll() [pdostatement.fetchall]: SQLSTATE[HY000]: General error: PDO::FETCH_KEY_PAIR fetch mode requires the result set to contain extactly 2 columns. -- Edit bug report at http://bugs.php.net/bug.php?id=55053&edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=55053&r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=55053&r=trysnapshot53 Try a snapshot (trunk): http://bugs.php.net/fix.php?id=55053&r=trysnapshottrunk Fixed in SVN: http://bugs.php.net/fix.php?id=55053&r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=55053&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=55053&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=55053&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=55053&r=needscript Try newer version: http://bugs.php.net/fix.php?id=55053&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=55053&r=support Expected behavior: http://bugs.php.net/fix.php?id=55053&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=55053&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=55053&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=55053&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=55053&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=55053&r=dst IIS Stability: http://bugs.php.net/fix.php?id=55053&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=55053&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=55053&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=55053&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=55053&r=mysqlcfg
