#43139 [NEW]: PDO ignore ATTR_DEFAULT_FETCH_MODE in some cases

From: Date: Tue, 30 Oct 2007 11:49:32 +0000
Subject: #43139 [NEW]: PDO ignore ATTR_DEFAULT_FETCH_MODE in some cases
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-119073@lists.php.net to get a copy of this message
From: develar at gmail dot com Operating system: Windows XP SP2 PHP version: 5.2.4 PHP Bug Type: PDO related Bug description: PDO ignore ATTR_DEFAULT_FETCH_MODE in some cases Description: ------------ In 5.2.4 (earlier all worked) and 5.2.5RC2dev (I now use this version) PDO ignore ATTR_DEFAULT_FETCH_MODE. PostgreSQL 8.2.4 and 8.3beta1. Reproduce code: --------------- <?php $Db = new PDO('pgsql:host=localhost;dbname=test', 'postgres', 'password'); $Db->setAttribute(PDO::ATTR_DEFAULT_FETCH_MODE, PDO::FETCH_ASSOC); $Db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_WARNING); print_r($Db->query('select 0 as name, 1 as table, 2 as schema')->fetchAll(PDO::FETCH_GROUP)); ?> Expected result: ---------------- Array ( [0] => Array ( [0] => Array ( [table] => 1 [schema] => 2 ) ) ) Actual result: -------------- Array ( [0] => Array ( [0] => Array ( [table] => 1 [0] => 1 [schema] => 2 [1] => 2 ) ) ) -- Edit bug report at http://bugs.php.net/?id=43139&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=43139&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=43139&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=43139&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=43139&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=43139&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=43139&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=43139&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=43139&r=needscript Try newer version: http://bugs.php.net/fix.php?id=43139&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=43139&r=support Expected behavior: http://bugs.php.net/fix.php?id=43139&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=43139&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=43139&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=43139&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=43139&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=43139&r=dst IIS Stability: http://bugs.php.net/fix.php?id=43139&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=43139&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=43139&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=43139&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=43139&r=mysqlcfg

« previous php.bugs (#119073) next »