Doc #68248 [Ver->Csd]: Syntax error in example code

From: Date: Wed, 09 Sep 2015 12:35:10 +0000
Subject: Doc #68248 [Ver->Csd]: Syntax error in example code
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-12742@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=68248&edit=1 ID: 68248 Updated by: cmb@php.net Reported by: php at gosoftware dot com dot au Summary: Syntax error in example code -Status: Verified +Status: Closed Type: Documentation Problem Package: sqlsrv PHP Version: 5.4.34 Assigned To: cmb Block user comment: N Private report: N New Comment: This bug has been fixed in the documentation's XML sources. Since the online and downloadable versions of the documentation need some time to get updated, we would like to ask you to be a bit patient. Thank you for the report, and for helping us make our documentation better. Previous Comments: ------------------------------------------------------------------------ [2015-09-09 12:34:20] cmb@php.net Automatic comment from SVN on behalf of cmb Revision: http://svn.php.net/viewvc/?view=revision&amp;revision=337791 Log: fixed syntax error in sqlsrv_num_fields() example (closes #68248) ------------------------------------------------------------------------ [2014-10-17 07:48:01] php at gosoftware dot com dot au Description: ------------ --- From manual page: http://www.php.net/function.sqlsrv-num-fields --- I believe that there is an error in the documentation page - one two many { characters in the example ... I think that it should be .... // Example of sqlsrv_num_fields $sql = "SELECT * FROM Table_1"; $query = sqlsrv_query($conn, $sql); if( $query === false) { die( print_r( sqlsrv_errors(), true)); } $numFields = sqlsrv_num_fields( $query ); while( sqlsrv_fetch( $stmt )) { for($i = 0; $i < $numFields; $i++) { // Iterate through the fields of each row. echo sqlsrv_get_field($stmt, $i)." "; } echo "<br />"; } ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=68248&edit=1

« previous php.doc.bugs (#12742) next »