<?php
$allsql="SELECT SUM(Salesprofit)+SUM(Serviceprofit)+SUM(softwareprofit)+SUM(Airtelprofit) FROM billing,service,software,airtel";
$profitall=mysql_query($allsql) or die(mysql_error());
while($row=@mysql_fetch_array($profitall))
{
echo $row['SUM(Salesprofit)+SUM(Serviceprofit)+SUM(softwareprofit)+SUM(Airtelprofit)'];
}
mysql_close($con);
?>
Hi everybody....
i have problem in mysql query..
i got the sum for the field called profit from each table...
i am getting the TOTAL value as wrong calculation value...
how do i get the total value from all the table...
Can anyone help me .. i have attached the code to get the total from all the table...
can anyone help me...