ID:               43742
 Updated by:       [EMAIL PROTECTED]
 Reported By:      mo at modejong dot com
-Status:           Open
+Status:           Bogus
-Bug Type:         MSSQL related
+Bug Type:         MySQL related
 Operating System: WinXP
 PHP Version:      5.2.5
 New Comment:

Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

When functions receive invalid number of parameters they raise an error

and return NULL, that's a typically PHP behavior. 


Previous Comments:
------------------------------------------------------------------------

[2008-01-03 21:09:35] mo at modejong dot com

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 this bug report at http://bugs.php.net/?id=43742&edit=1

Reply via email to