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

From: Date: Tue, 15 May 2001 02:42:04 +0000
Subject: Bug #10825 Updated: mysql_field_name() won't return element 0
Groups: php.dev 
Request: Send a blank email to php-dev+get-55283@lists.php.net to get a copy of this message
ID: 10825 User Update by: norny@geocities.com 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] norny@geocities.com 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

« previous php.dev (#55283) next »