|   | php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
| 
 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits              [2002-01-19 03:33 UTC] sander@php.net
 | |||||||||||||||||||||||||||||||||||||
|  Copyright © 2001-2025 The PHP Group All rights reserved. | Last updated: Fri Oct 31 18:00:01 2025 UTC | 
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! =)