What I try to ask is how to select from database record and my php code add the amount together.
here is my select mysql part:
$query= mysql_query("SELECT amount FROM item");
while($res=mysql_fetch_array($query)){
$totalamount= $res['amount'];
echo $totalamount;
}
my database got 4 records so it echo out is 1.002.003.001.50 , also as know as 1.00 2.00 3.00 1.50
I must using loop because it got a lot records in my database,so how can I add all this echo out answer become 7.80?
Thanks