Edit report at http://bugs.php.net/bug.php?id=51189&edit=1
ID: 51189 Updated by: u...@php.net Reported by: ste dot sullivan at gmail dot com Summary: mysql_field_len reporting value incorrectly -Status: No Feedback +Status: Feedback Type: Bug Package: MySQL related Operating System: Gentoo PHP Version: Irrelevant Assigned To: mysql Previous Comments: ------------------------------------------------------------------------ [2010-03-22 09:33:46] u...@php.net Please send DDL = table definition = schema of table "mytable". Thanks! ------------------------------------------------------------------------ [2010-03-21 19:34:39] fel...@php.net Please, post the DDL used to create the table. ------------------------------------------------------------------------ [2010-03-03 02:30:03] ste dot sullivan at gmail dot com Ooops - The second expected result should be: Phone { string ( 16 ) } The version information also seems to have been wiped from my original post: PHP: 5.2.12-pl0-gentoo MYSQL Client API: 5.0.84 ------------------------------------------------------------------------ [2010-03-03 02:01:13] ste dot sullivan at gmail dot com Description: ------------ I am using Gentoo Test script: --------------- $db=mysql_connect("localhost","user","pass"); $q=mysql_query("SELECT * FROM mytable"); for($i=0;$i<mysql_num_fields($q);$i++) { $fnames[$i]=mysql_field_name($q,$i); echo $fnames[$i]." { ".mysql_field_type($q,$i)." ( ".mysql_field_len($q,$i)." ) }\n"; } Expected result: ---------------- Name { string ( 50 ) } Phone { string ( 48 ) } Email { string ( 255 ) } Actual result: -------------- Name { string ( 150 ) } Phone { string ( 48 ) } Email { string ( 765 ) } ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/bug.php?id=51189&edit=1