php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #45876 PDO: DBLIB does not support getColumnMeta
Submitted: 2008-08-20 21:40 UTC Modified: 2010-06-28 01:59 UTC
Votes:3
Avg. Score:5.0 ± 0.0
Reproduced:3 of 3 (100.0%)
Same Version:2 (66.7%)
Same OS:0 (0.0%)
From: ssufficool at rov dot sbcounty dot gov Assigned: ssufficool (profile)
Status: Closed Package: PDO related
PHP Version: 5.2.6 OS: Gentoo Linux
Private report: No CVE-ID: None
 [2008-08-20 21:40 UTC] ssufficool at rov dot sbcounty dot gov
Description:
------------
When using the mssql_* functions it is possible to read column meta data using mssql_fetch_field in conjunction with the freetds library. However it is not possible to use PDOStatement::getColumnMeta using the same library.

The library must support this functionality in some way even if limited, the additional attributes may be set to false or NULL.

Reproduce code:
---------------
$conn = new PDO("dblib:host=myhost","user","pass");

$rs = $conn->query("SELECT * FROM SOMETABLE");

print_r($rs->getColumnMeta(0));

Expected result:
----------------
Array(
"key" => "value",
"key" => "value",
"key" => "value",
"key" => "value"
);

Actual result:
--------------
Warning: PDOStatement::getColumnMeta() [pdostatement.getcolumnmeta]: SQLSTATE[IM001]: Driver does not support this function: driver doesn't support meta data 

Patches

pdo_dblib_meta (last revision 2010-06-21 06:51 UTC by ssufficool at gmail dot com)

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-06-21 08:50 UTC] ssufficool@php.net
-Package: Feature/Change Request +Package: *General Issues -Assigned To: +Assigned To: ssufficool
 [2010-06-21 08:54 UTC] ssufficool@php.net
Automatic comment from SVN on behalf of ssufficool
Revision: http://svn.php.net/viewvc/?view=revision&revision=300627
Log: Fix bug #45876 adding get column meta
 [2010-06-21 08:55 UTC] ssufficool@php.net
-Status: Assigned +Status: Closed
 [2010-06-21 08:55 UTC] ssufficool@php.net
Fixed in revision 300627.
 [2010-06-28 01:59 UTC] ssufficool@php.net
-Package: *General Issues +Package: PDO related
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Fri Sep 20 08:01:27 2019 UTC