如果是计算MYSQL数据某字段的和值,可以使用SQL语句,示例如下:
Select Sum(total_score) as "ScrTotal" from 数据库名
mysql_query('SELECT SUM(total_score) AS s FROM table');