|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2012-02-11 11:12 UTC] johannes@php.net
-Status: Open
+Status: Not a bug
[2012-02-11 11:12 UTC] johannes@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Dec 08 07:00:01 2025 UTC |
Description: ------------ mysql_fetch_field returns type = "string" for enum fields in the MySQL database, but should instead return "enum" and an array of possible values for convenience. Test script: --------------- <?php $connect = mysql_connect('localhost','user','password'); mysql_select_db('some_database',$connect); $query = mysql_query('SELECT * FROM table'); var_dump(mysql_fetch_field($query,1)); ?> Expected result: ---------------- array(12) { ... ["type"]=> string(6) "string" ... } Actual result: -------------- array(12) { ... ["type"]=> array(3) { string(1) "a" [1]=> string(1) "b" [2]=> string(1) "c" } ... }