Re: mysqli_fetch_field() mysqlnd & libmysql differences

From: Date: Mon, 23 Jan 2012 09:40:04 +0000
Subject: Re: mysqli_fetch_field() mysqlnd & libmysql differences
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to internals+get-57479@lists.php.net to get a copy of this message
Hi, On Sat, 2012-01-21 at 08:31 -0500, Daniel Convissor wrote: > Hi Johannes: > > > The documentation tells > > > > > > http://dev.mysql.com/doc/refman/5.5/en/c-api-data-structures.html > > > > So it is working in bytes and has to hold all possible values. > > That's how MySQL's internal API works. At the same time, PHP's users > expect PHP to behave as documented. > http://php.net/mysqli_fetch_field says > length is "The width of the field, as specified in the table > definition." We have to live with the information the server gives us. The server gives us the information in bytes. And frankly in PHP a string has no encoding information, so in many cases that is a good answer. But nonetheless the documentation should be improved/fixed. johannes

« previous php.internals (#57479) next »