Im struggling to get the totals of values from a database.
Heres my code
$SQL3 = "SELECT SUM(EntryValue) AS Inatangible_Total FROM Entry WHERE UserID = '$userID' AND EntryAdjustment IS NULL AND (EntrySelect=4 AND (EntryBalanceSheet=1))";
$result3 = mysql_query($SQL3) or die(mysql_error());
while($row3 = mysql_fetch_array($result3))
{
$totalIntangibles = $row3['Intangible_Total'];
}
And heres where Im echoing the result
<TBODY class="total">
<TR>
<TH frame="above" align="right" colspan=8 scope="row">Total Net Cost</TH>
<TD><?php echo "£";
echo number_format(($totalIntangibles),2,".",",");?></TD>
</TR>
</TBODY>
I've tried so many diferent things but it just keeps returning £0.00
Any help is aprieciated
Thanks