You always have to use a mysql function to access the data in the result set!
You should change your query so you don't run multiple queries -
<?
$query = "SELECT a.* , b.Funds AS rfunds, c.Funds AS ofunds
FROM tblcontracts a, tblcomp b, tblcomp c
WHERE a.isopen=0
AND a.recipient=b.Compname
AND a.origin=c.Compname";
$resulta = mysql_query($query)
or die('MySQL error: '.mysql_error().'<br>Query: '.$query);
while ($row = mysql_fetch_array($resulta)) {
$contractid = $row["id"];
$origin = $row["origin"];
$recipient = $row["recipient"];
$rtype = $row["rtype"];
$rvalue = $row["rvalue"];
$rduration = $row["rduration"];
$otype = $row["otype"];
$ovalue = $row["ovalue"];
$oduration = $row["oduration"];
$duration = $row["duration"];
$rfunds = $row['rfunds'];
$ofunds = $row['ofunds'];
echo "<br>Transaction #";
echo $contractid;
echo " starting...";
$message = "Transaction OK";
echo "<br>Recipient Funds: ";
echo $rfunds;
echo "<br>Origin Funds: ";
echo $ofunds;
}
?>
Hope this helps 😉