php - 计算行值

时间:2014-10-15 07:51:03

标签: php sql

            $teams_w = $da['win'];
            $teams_d = $da['draw'];
            $teams_l = $da['lost'];
            $teams_p = $da['points'];
            $teams_m = $teams_w+teams_d+teams_l;

这是对的吗?

因为$ teams_m只计算$ teams_w值。

1 个答案:

答案 0 :(得分:0)

试试这个:

$teams_m = $teams_w + $teams_d + $teams_l;

您尚未将$置于状态

中表明它们是变量