From: mo at modejong dot com
Operating system: WinXP
PHP version: 5.2.5
PHP Bug Type: MSSQL related
Bug description: mysql_field_name does not return FALSE on error
Description:
------------
The mysql_field_name API should return FALSE on errror,
that is what the docs state, but the impl returns NULL.
Here is what the current code returns:
mysql_field_name($res):
Warning: Wrong parameter count for mysql_field_name() in
C:\caucho_dev\trunk\qa\php\f.qa on line 11
NULL
Reproduce code:
---------------
<php out='stdout'>
<?php
mysql_connect("localhost", "", "");
mysql_query("USE test");
$res = mysql_query("SELECT * FROM test WHERE id = 1");
echo 'mysql_field_name($res): ';
var_dump(mysql_field_name($res));
?>
</php>
Expected result:
----------------
Should return FALSE.
--
Edit bug report at http://bugs.php.net/?id=43742&edit=1
--
Try a CVS snapshot (PHP 4.4):
http://bugs.php.net/fix.php?id=43742&r=trysnapshot44
Try a CVS snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=43742&r=trysnapshot52
Try a CVS snapshot (PHP 5.3):
http://bugs.php.net/fix.php?id=43742&r=trysnapshot53
Try a CVS snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=43742&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=43742&r=fixedcvs
Fixed in release:
http://bugs.php.net/fix.php?id=43742&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=43742&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=43742&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=43742&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=43742&r=support
Expected behavior: http://bugs.php.net/fix.php?id=43742&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=43742&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=43742&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=43742&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=43742&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=43742&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=43742&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=43742&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=43742&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=43742&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=43742&r=mysqlcfg