Hi, Does maxdb_stmt_result_metadata() already returns FALSE? What do you mean with "the code works fine under PHP Version 4.3.10"? Always FALSE is returned, or arrays are returned under 4.3.10?
For detailed error analyses please switch the sqldbc trace on. Type the following: sqldbc_cons config trace sql on Run the PHP program again and send me the produced trace file. You can get the location of this file by typing sqldbc_cons show all Regards, Thomas Simenec SAP Labs Berlin -----Original Message----- From: MaxDB SAP [mailto:[EMAIL PROTECTED] Sent: Donnerstag, 12. Mai 2005 15:29 To: [email protected] Subject: PHP5 maxdb functions PHP Version: 5.0.2 Maxdb Version: 7.5.23 OS: Redhat Linux 9.1 I'm having some trouble with getting metadata on a statement. My code runs as follows, and is to bind a statement result to an array variable: $mData=maxdb_stmt_result_metadata($this->statement); // $this->statement is a statement resource $bindVals="\$bindRes =@ maxdb_stmt_bind_result(\$this->statement"; $numFields = maxdb_num_fields($mData); for($fno=0;$fno<$numFields;$fno++) { $field=maxdb_fetch_field_direct($mData,$fno); $bindVals.=",\$this->statementResult['".$field->name."']"; } $bindVals.=");"; eval($bindVals); I have already tried the maxdb_fetch_field function and this has problems too: The problem is that $field always becomes a boolean true and according to the documentation I should get either a boolean false or an array returned from maxdb_fetch_field_direct. Is this a bug with PHP 5, or am I doing something wrong? The code works fine under PHP Version 4.3.10. Regards, Maxdb.PHP -- MaxDB Discussion Mailing List For list archives: http://lists.mysql.com/maxdb To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] -- MaxDB Discussion Mailing List For list archives: http://lists.mysql.com/maxdb To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]
