I have table money in first row I have number 10 in second 20 and third 30 and now I'm going to sum this rows and save into variable $sum
This is my code
$result = mysql_query("SELECT SUM(money) as total FROM $tbl_name WHERE id='$idd'");
$row= mysql_fetch_array($result);
$sum= $row['total'];
If I print $sum
Result is 102030 but I need to print 60