Forum Moderators: coopster
while($row = mysql_fetch_assoc($result)) {
foreach ($row as $fieldname => $fieldvalue) {
echo $values[]=$fieldvalue;
}
}
This is where my problem occurs a "Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in C:\Apache2\htdocs\TibcoGI\JSXAPPS\QSSBooks\getCustomerRecords.php on line 78" occurs when I try to run the script. If anyone could help I sure would appreciate it. I have spent a full day trying to figure out what could be the problem. I just can't seem to move forward with it.
$result = mysql_query($query,$conn);
$row = mysql_num_rows($result);
while($row = mysql_fetch_assoc($result)) {
foreach ($row as $fieldname => $fieldvalue) {
echo $values[]=$fieldvalue;
}
}
This does it but I don't know if there are any better ways of doing it. In terms of performance I am not convinced, thanks for your reply cameraman.
As far as performance goes you can always use the MySQL EXPLAIN [dev.mysql.com] statement to get your query optimized.