#39892 [Opn->Fbk]: fetch_fields / fetch_field_direct

From: Date: Tue, 19 Dec 2006 21:37:21 +0000
Subject: #39892 [Opn->Fbk]: fetch_fields / fetch_field_direct
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-106598@lists.php.net to get a copy of this message
ID: 39892 Updated by: tony2001@php.net Reported By: migues at email dot cz -Status: Open +Status: Feedback Bug Type: MySQLi related Operating System: Win XP Pro SP2 PHP Version: 5.2.0 New Comment: Thank you for this bug report. To properly diagnose the problem, we need a short but complete example script to be able to reproduce this bug ourselves. A proper reproducing script starts with <?php and ends with ?>, is max. 10-20 lines long and does not require any external resources such as databases, etc. If the script requires a database to demonstrate the issue, please make sure it creates all necessary tables, stored procedures etc. Please avoid embedding huge scripts into the report. Previous Comments: ------------------------------------------------------------------------ [2006-12-19 21:23:11] migues at email dot cz Description: ------------ MySQL version: 5.0.27 def column for fetch_fields / fetch_field_direct is empty even if default values are set Reproduce code: --------------- $arrfields=$res->fetch_fields(); for ($i=0;$i<$res->field_count;$i++) { // /*OR */ foreach ($arrfields as $arrname=>$arrfld) //{ $arrfld=$res->fetch_field_direct($i); $fldinfo->appendChild($fldNode=$this->DOM->createElement(dbtag_field)); $fldNode->setAttribute(dbtag_fieldname,$arrfld->name); $fldNode->setAttribute(dbtag_fieldorgname,$arrfld->orgname); foreach($arrfld as $key=>$val) { $fldNode->appendChild($this->DOM->createElement($key,$val)); }}; Expected result: ---------------- <name>fieldname</name> .... <def>default _ value</def> .... Actual result: -------------- <name>fieldname</name> .... <def></def> .... ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=39892&edit=1

« previous php.bugs (#106598) next »