Req #66028 [Opn->Fbk]: Get columns names
| From: | adambaratz@php.net | Date: | Wed, 01 Mar 2017 22:53:25 +0000 |
| Subject: | Req #66028 [Opn->Fbk]: Get columns names | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-207647@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=66028&edit=1
ID: 66028
Updated by: adambaratz@php.net
Reported by: luciotato at gmail dot com
Summary: Get columns names
-Status: Open
+Status: Feedback
Type: Feature/Change Request
Package: PDO related
Operating System: windows
PHP Version: 5.4.21
Block user comment: N
Private report: N
New Comment:
getColumnMeta is the correct place for this information. It provides this info for a handful of
drivers. Is there a specific driver you'd like column names added for? Or is the underlying
issue really one of improving the documentation?
Previous Comments:
------------------------------------------------------------------------
[2013-11-03 20:41:48] luciotato at gmail dot com
Description:
------------
A simple function to return column names, give that getColumnMeta is experimental.
My use case:
for SQlite, "select * from ..."
PDO::Statement::columnCount() returns 17 (OK)
PDO::Statement::getColumnMeta(0) throws ERROR. Invalid index
Proposed:
PDO::Statement::getColumnNames() -> return array of column names.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=66028&edit=1