php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #66028 Get columns names
Submitted: 2013-11-03 20:41 UTC Modified: 2017-03-12 04:22 UTC
Votes:1
Avg. Score:4.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:0 (0.0%)
From: luciotato at gmail dot com Assigned:
Status: No Feedback Package: PDO related
PHP Version: 5.4.21 OS: windows
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
43 - 35 = ?
Subscribe to this entry?

 
 [2013-11-03 20:41 UTC] 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.




Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2017-03-01 22:53 UTC] adambaratz@php.net
-Status: Open +Status: Feedback
 [2017-03-01 22:53 UTC] adambaratz@php.net
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?
 [2017-03-12 04:22 UTC] php-bugs at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Apr 29 01:01:30 2024 UTC