#25910 [Opn->Csd]: Error in example 1 in the mysql_fetch_field doco
| From: | ali@php.net | Date: | Sun, 19 Oct 2003 15:49:48 +0000 |
| Subject: | #25910 [Opn->Csd]: Error in example 1 in the mysql_fetch_field doco | ||
| References: | 1 | Groups: | php.doc |
| Request: | Send a blank email to phpdoc+get-969356648@lists.php.net to get a copy of this message | ||
ID: 25910
Updated by: ali@php.net
Reported By: dissent at 0--0 dot org
-Status: Open
+Status: Closed
Bug Type: Documentation problem
PHP Version: Irrelevant
New Comment:
This bug has been fixed in CVS.
In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at http://snaps.php.net/.
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.
In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites in short time.
Thank you for the report, and for helping us make PHP better.
Previous Comments:
------------------------------------------------------------------------
[2003-10-19 11:11:02] dissent at 0--0 dot org
Description:
------------
In the english version of the manual, the documentation for
mysql_fetch_field, there's an error in example 1. The second line in
the while loop should use $i, not $result.
The line
$meta = mysql_fetch_field($result);
Should be:
$meta = mysql_fetch_field($i);
Expected result:
----------------
while ($i < mysql_num_fields($result)) {
echo "Information for column $i:<br />\n";
$meta = mysql_fetch_field($i);
if (!$meta) {
echo "No information available<br />\n";
}
Actual result:
--------------
while ($i < mysql_num_fields($result)) {
echo "Information for column $i:<br />\n";
$meta = mysql_fetch_field($result);
if (!$meta) {
echo "No information available<br />\n";
}
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=25910&edit=1