|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2006-04-29 21:56 UTC] wez@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Nov 02 16:00:01 2025 UTC |
Description: ------------ PDOStatement::getColumnMeta() should allow a parameter (be it the same parameter as -1 or some other option) to return all columns. Reproduce code: --------------- $array = array(); for ($i = 0; $i < PDOStatement::columnCount(); $i++) { $array[] = PDOStatement::getColumnMeta($i); } could easily be replaced with a two-dimensional array that will return all columns. The primary advantage would be avoiding $i function calls to getColumnMeta and $i to columnCount, which could be substantial versus returning the whole table meta data. Returning a table's meta-data is nice to know the schema that's being returned. A quick way to get the field names back.