From:             dissent at 0--0 dot org
Operating system: 
PHP version:      Irrelevant
PHP Bug Type:     Documentation problem
Bug description:  Error in example 1 in the mysql_fetch_field doco

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 bug report at http://bugs.php.net/?id=25910&edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=25910&r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=25910&r=trysnapshot5
Fixed in CVS:               http://bugs.php.net/fix.php?id=25910&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=25910&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=25910&r=needtrace
Try newer version:          http://bugs.php.net/fix.php?id=25910&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=25910&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=25910&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=25910&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=25910&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=25910&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=25910&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=25910&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=25910&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=25910&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=25910&r=float

Reply via email to