Req #43891 [Opn->Csd]: mysql_fetch_field for PDO

From: Date: Mon, 24 Apr 2017 19:11:02 +0000
Subject: Req #43891 [Opn->Csd]: mysql_fetch_field for PDO
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-208760@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=43891&edit=1 ID: 43891 Updated by: adambaratz@php.net Reported by: mynameismrburns at yahoo dot com Summary: mysql_fetch_field for PDO -Status: Open +Status: Closed Type: Feature/Change Request -Package: PDO related +Package: PDO MySQL Operating System: any PHP Version: 5.2.5 -Assigned To: +Assigned To: adambaratz Block user comment: N Private report: N New Comment: 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. Previous Comments: ------------------------------------------------------------------------ [2008-01-18 21:04:48] mynameismrburns at yahoo dot com Description: ------------ 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: SET CHARACTER SET utf8; CREATE TABLE newtable ( Id int(11) NOT NULL auto_increment, NewField varchar(255) default NULL, NewField2 varbinary(255) default NULL, PRIMARY KEY (Id) ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1; 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? ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=43891&edit=1

« previous php.bugs (#208760) next »