#48536 [Opn->Bgs]: mysql_fetch_field not returning default value

From: Date: Mon, 15 Jun 2009 08:49:59 +0000
Subject: #48536 [Opn->Bgs]: mysql_fetch_field not returning default value
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-138292@lists.php.net to get a copy of this message
 ID:               48536
 Updated by:       jani@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



Thread (2 messages)

« previous php.bugs (#138292) next »