Bug #10825: mysql_field_name() won't return element 0

From: Date: Sat, 12 May 2001 09:13:10 +0000
Subject: Bug #10825: mysql_field_name() won't return element 0
Groups: php.dev 
Request: Send a blank email to php-dev+get-54988@lists.php.net to get a copy of this message
From: norny@geocities.com Operating system: Win98 and Linux 2.4.4 PHP version: 4.0.5 PHP Bug Type: MySQL related Bug description: mysql_field_name() won't return element 0 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. -- Edit Bug report at: http://bugs.php.net/?id=10825&edit=1

« previous php.dev (#54988) next »