Req #61053 [NEW]: mysql_fetch_field should return type = "enum" and enum options
| From: | zzatkin at gmail dot com | Date: | Sat, 11 Feb 2012 01:49:06 +0000 |
| Subject: | Req #61053 [NEW]: mysql_fetch_field should return type = "enum" and enum options | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-167418@lists.php.net to get a copy of this message | ||
From:
Operating system: Linux
PHP version: 5.3.10
Package: MySQL related
Bug Type: Feature/Change Request
Bug description:mysql_fetch_field should return type = "enum" and enum options
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"
}
...
}
--
Edit bug report at https://bugs.php.net/bug.php?id=61053&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=61053&r=trysnapshot54
Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=61053&r=trysnapshot53
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=61053&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=61053&r=fixed
Fixed in SVN and need be documented: https://bugs.php.net/fix.php?id=61053&r=needdocs
Fixed in release: https://bugs.php.net/fix.php?id=61053&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=61053&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=61053&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=61053&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=61053&r=support
Expected behavior: https://bugs.php.net/fix.php?id=61053&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=61053&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=61053&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=61053&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=61053&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=61053&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=61053&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=61053&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=61053&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=61053&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=61053&r=mysqlcfg