I am trying to add up the cost column, but having no success. Can someone tell me what I am doing wrong?
$sql = "
SELECT *, SUM(maint.cost) AS totalcost
FROM maint, lsv
WHERE maint.vid = \"$vid\"
AND maint.vid = lsv.vid
ORDER BY maint.date DESC
";
Parts of the script:
$totalcost = $row['totalcost'];
Total Spent On Maintenance: $totalcost
Thanks for all your help!
:o) Ivan