ID: 48536 Updated by: j...@php.net Reported By: ben6691 at gmail dot com -Status: Open +Status: Bogus Bug Type: MySQL related Operating System: linux PHP Version: 5.2.9 New Comment:
Please do not submit the same bug more than once. An existing bug report already describes this very problem. Even if you feel that your issue is somewhat different, the resolution is likely to be the same. Thank you for your interest in PHP. See bug #16384 Previous Comments: ------------------------------------------------------------------------ [2009-06-12 10:58:41] ben6691 at gmail dot com Description: ------------ The mysql_fetch_field function isn't returning the default value of a column. Reproduce code: --------------- $res2 = mysql_query("SELECT * FROM `$tablename`"); while ($property = mysql_fetch_field($res2)){ echo "Field name: " . $property->name . "<br />"; echo "Table name: " . $property->table . "<br />"; echo "Default value: " . $property->def . "<br /><br />"; } Expected result: ---------------- Field name: pages Table name: prefix_smallCMS_site Default value: no Actual result: -------------- Field name: pages Table name: prefix_smallCMS_site Default value: ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=48536&edit=1