PHP编程,MYSQL的sum()函数问题,如何打印到页面

2024-12-25 12:46:55
推荐回答(3个)
回答1:

$zzhichu = $conn->query( "select sum(money) as total_money from record where usernameid='$usernameid'");

$result = mysql_fetch_assoc($zzhichu);

echo $result['total_money']; 希望能够帮助你,望采纳,O(∩_∩)O谢谢

回答2:

$zzhichu = $conn->query( "select sum(money) as total_money from record where usernameid='$usernameid'");

$result = mysql_fetch_assoc($zzhichu);

echo $result['total_money'];

回答3:

打印到页面用echo即可。