LPR> --------------------------------------------
LPR> while($row = mysql_fetch_array($result))
LPR> {
LPR> $pri = $row['pri'];
LPR> $fg = $row['fg'];
LPR> $molw = $row['molw'];
LPR> $density = $row['density'];
LPR> $denstype = $row['denstype'];
LPR> $pctd = $row['pctd'];
LPR> $maxpctd = $row['maxpctd'];
LPR> $compid = $row['compid'];
LPR> $sql = "select * from compounds where compid = \"$compid\"";
LPR> $result = mysql_query($sql,$conn);
LPR> $row = mysql_fetch_array($result);
LPR> $compname = $row['compname'];
LPR> $concentration = $row['concentration'];
LPR> $concunit = $row['concunit'];
LPR> $type = $row['type'];
LPR> $composition = $row['composition'];
LPR> if ($fg=="Y")
LPR> $html .= "<b>$concentration $concunit $compname</b><br>";
LPR> else if ($pri=="Y")
LPR> $html .= "<font color=\"#000066\"> $concentration $concunit
LPR> $compname</font><br>";
LPR> else
LPR> $html .= " $concentration $concunit $compname<br>";
LPR> }
LPR> --------------------------------------------
You are re-assigning the value of $row within the while construct.
When you get to your query within the while chunk, use different
variable names than the "master".
- Julie
--> Julie Meloni
--> [EMAIL PROTECTED]
--> www.thickbook.com
Find "Sams Teach Yourself MySQL in 24 Hours" at
http://www.amazon.com/exec/obidos/ASIN/0672323494/thickbookcom-20
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php