[PHP-DB] RE: Could get all data from MYSQL using Mysql_fetch_array!!

2001-08-30 Thread Andrew Chase
> -Original Message- > From: Andrew Chase [mailto:[EMAIL PROTECTED]] > Or you could do it longhand - > > while ($row= mysql_fetch_array($result,MYSQL_ASSOC)) > { > print ("{$row["Reason"]}"); > print ("{$row["OtherField1]}"); > print ("{$row["OtherField2]}"); > } > Wh

[PHP-DB] RE: Could get all data from MYSQL using Mysql_fetch_array!!

2001-08-29 Thread Andrew Chase
You did fetch all the data by using '*' in your query, but you can't use '*' as a wildcard when referring to an associative array (which is what $row is) - you need to step through each key in the array: while ($row= mysql_fetch_array($result,MYSQL_ASSOC)) { $fields = array_keys($row);