ID: 10825
User Update by: [EMAIL PROTECTED]
Old-Status: Open
Status: Closed
Bug Type: MySQL related
Operating system: Win98 and Linux 2.4.4
PHP Version: 4.0.5
Description: mysql_field_name() won't return element 0
Nevermind. It was my script, not PHP itself.
Previous Comments:
---------------------------------------------------------------------------
[2001-05-12 05:13:10] [EMAIL PROTECTED]
I can't get mysql_field_name() to return the field name of
position 0 in the mysql result from my query. All subsiquent
field names appear, just not the first one. I even tried
just forcing a 0 in the position instead of the incremented
variable:
$result = mysql_query ( $sql );
while($db_content = mysql_fetch_row($result)) {
for($i=0; $i < sizeof($db_content); $i++) {
echo mysql_field_name($result, 0);
}
}
That code doesn't output anything whereas if I replace the 0
in mysql_field_name() with $i, it prints the field names of
all but my first column.
---------------------------------------------------------------------------
Full Bug description available at: http://bugs.php.net/?id=10825
--
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]