I'm either too tired to see it or this makes no sense. I have some simple straight forward code which isn't working. Can anyone show me the light? I run this below and it returns 1 row. I have run the select statement locally and it returns 4 (which is right). Why am I only getting 1 return? My num_rows shows very clearly that it sees 4 rows, but still, print_r($array) only shows the (1st) row from the table. If I delete the first row, it reads the 2nd match, but only that one. Ugh.
Thank you anyone for some insight.
John
$link = mysql_connect("machine","user","pass");
$selectdb = mysql_select_db("db",$link);
$query = "SELECT * FROM data WHERE userid = $userid";
$result = mysql_query($query,$link);
$array = mysql_fetch_array($result);
$columns = mysql_list_fields("db","table",$link);
$columntotal = mysql_num_fields($columns);
$num_rows = mysql_num_rows($result);
print "num_rows: $num_rows Rows<br>";