Bug #15111: mysql_fetch_array() returns bad array

From: Date: Sat, 19 Jan 2002 04:59:36 +0000
Subject: Bug #15111: mysql_fetch_array() returns bad array
Groups: php.dev 
Request: Send a blank email to php-dev+get-77500@lists.php.net to get a copy of this message
From: compman86@home.com Operating system: Windows 2000 PHP version: 4.1.1 PHP Bug Type: MySQL related Bug description: mysql_fetch_array() returns bad array 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 bug report at: http://bugs.php.net/?id=15111&edit=1

« previous php.dev (#77500) next »