php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #37668 fetch->Field doesn't take the correct type
Submitted: 2006-06-01 23:46 UTC Modified: 2006-06-20 14:39 UTC
From: eric dot potvin at zendphp dot com Assigned:
Status: Not a bug Package: MySQLi related
PHP Version: 5.1.4 OS: WIN32 & FREEBSD
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 !
Your email address:
MUST BE VALID
Solve the problem:
38 - 37 = ?
Subscribe to this entry?

 
 [2006-06-01 23:46 UTC] eric dot potvin at zendphp dot com
Description:
------------
The mysqli_fetch_fields dosen't take the correct field type for the ENUM and SET type.

Reproduce code:
---------------
Create a table with a ENUM type with value like 'True', 'False' and default value to True.

do : $finfo = mysqli_fetch_field($result)

you will get : $finfo->type = 254 
So, a STRING. - MYSQLI_TYPE_STRING and with no default value.

Same thing for the set type.

Expected result:
----------------
The $finfo->type 
should have 247 (MYSQLI_TYPE_ENUM) as value.

or 

248 (MYSQLI_TYPE_SET) as value for a SET type


Actual result:
--------------
array(0) {
}

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-06-20 14:39 UTC] tony2001@php.net
This is what MySQL API call returns and there is nothing we can do about it.
Please report it to MySQL developers.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu May 02 14:01:34 2024 UTC