|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2007-10-30 14:29 UTC] stochnagara at hotmail dot com
[2007-10-31 12:58 UTC] iliaa@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 30 22:00:01 2025 UTC |
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 ) ) )