Mysql php Calculate sum Add function row column result

Description

Mysql php Calculate sum Add function row column result. sum row result in php sum function used in mysql. mysql  Sum of column in using mysql and php 

Calculate Total Sum () function in Mysql php 

Display MySQL Calculate Total SUM() in PHP

Calculate Total Add and SUM the table row column values in database using PHP

 

How to Calculate sum Add totel row column result in php mysql

in this query used $rowtotelttdd['0'] array due to fetch single array value

 

 $subjwhere = $rowtotel['subjectlist']; 

 

 $showtotelctttdd=mysql_query("SELECT SUM(`desc`) FROM topic where subid = '".$subjwhere."'");

 $rowtotelttdd=mysql_fetch_array($showtotelctttdd);

 $sum = $rowtotelttdd['0'];     echo $sum;