|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #43891 mysql_fetch_field for PDO
Submitted: 2008-01-18 21:04 UTC Modified: 2017-04-24 19:10 UTC
Avg. Score:4.7 ± 0.7
Reproduced:4 of 5 (80.0%)
Same Version:3 (75.0%)
Same OS:4 (100.0%)
From: mynameismrburns at yahoo dot com Assigned: adambaratz (profile)
Status: Closed Package: PDO MySQL
PHP Version: 5.2.5 OS: any
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: mynameismrburns at yahoo dot com
New email:
PHP Version: OS:


 [2008-01-18 21:04 UTC] mynameismrburns at yahoo dot com
I Couldn't find anything that replace the mysql_fetch_field function in PDO.

I just found this hint: "pdo doesn't care about charsets. if you want to have your connection in unicode / utf-8 or any other encoding, you'll have to tell your database, for example using $dbh->exec('SET CHARACTER SET utf8') (mysql)"

But what is with Tables like this:

CREATE TABLE `newtable` ( 
  `Id` int(11) NOT NULL auto_increment, 
  `NewField` varchar(255) default NULL, 
  `NewField2` varbinary(255) default NULL, 
  PRIMARY KEY  (`Id`) 

If I now SELECT something, Id and NewField is UTF8 but NewField2 is still binary (like a JPEG).

Is there an option or is this not implemented?


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2011-01-01 23:54 UTC]
-Package: Feature/Change Request +Package: PDO related
 [2017-04-24 19:10 UTC]
-Status: Open +Status: Closed -Package: PDO related +Package: PDO MySQL -Assigned To: +Assigned To: adambaratz
 [2017-04-24 19:10 UTC]
PDOStatement::getColumnMeta() should be used to retrieve this information. If you'd like additional information returned with that call, please open a new feature request ticket.
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Thu Sep 16 20:03:36 2021 UTC