summaryrefslogtreecommitdiff
path: root/ChangeLog
diff options
context:
space:
mode:
authorWez Furlong <wez@php.net>2005-07-03 03:49:44 +0000
committerWez Furlong <wez@php.net>2005-07-03 03:49:44 +0000
commitd4a158260b77e6d7590bfbd63b32b812f4851026 (patch)
treef4db02b9e6f2e62c765c9280a166eda9a740235d /ChangeLog
parent75cfa5c2e0f66add8422770ac2d444a6b050c32e (diff)
downloadphp-git-d4a158260b77e6d7590bfbd63b32b812f4851026.tar.gz
Add PDO_FETCH_NAMED; closes PECL #4641 by providing a way to access columns
by name, even when multiple columns have the same name: $sql = "SELECT 1 a, 2 a, 3 b, 4 c, 5 d, 6 c, 7 a"; echo "$sql\n"; print_r($db->query($sql)->fetchAll(PDO_FETCH_NAMED)); Array ( [0] => Array ( [a] => Array ( [0] => 1 [1] => 2 [2] => 7 ) [b] => 3 [c] => Array ( [0] => 4 [1] => 6 ) [d] => 5 ) ) Also added two new attributes for use at prepare time; PDO_ATTR_FETCH_TABLE_NAMES and PDO_ATTR_FETCH_CATALOG_NAMES instruct the driver that the names of the columns that they return to PDO should include the table and catalog names respectively. Both attributes may be used together or independently. The catalog, table and column name components should be separated by a . character.
Diffstat (limited to 'ChangeLog')
0 files changed, 0 insertions, 0 deletions