ID: 15111 Updated by: sander Reported By: [EMAIL PROTECTED] Old Status: Open Status: Bogus Bug Type: MySQL related Operating System: Windows 2000 PHP Version: 4.1.1 New Comment:
mysql_fetch_array contains each field twice (numeric, and with fieldnames). RTM on mysql_fetch_row, mysql_fetch_array, and mysql_fetch_assoc. Previous Comments: ------------------------------------------------------------------------ [2002-01-18 23:59:35] [EMAIL PROTECTED] I have a table with 10 columns. I queried the mysql database to return only 5. I used mysql_fetch_array($queryID) to get an array of data to work with. When I did count(mysql_fetch_array($queryid)) it returned 8. When I did mysql_num_fields($queryid) it returned 5. Also, when I try to access the array returned from mysql_fetch_array as a numeric array, it doesn't work. It doesn't give warnings, but it doesn't give any data. Here is some sample code: $qid = mysql_query("SELECT a,b,c,d,e FROM table1"); echo mysql_fetch_array($qid); echo mysql_num_fields($qid); echo count(mysql_fetch_array($qid)); Thankyou for your time! =) ------------------------------------------------------------------------ Edit this bug report at http://bugs.php.net/?id=15111&edit=1 -- 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]