I have try to record numbers on to a db, but I can't insert column sum. Example:
Records:
check1 check2 check3 sum_number roll_sum
500 510 500 3.3 3.3(should be)
490 500 505 -1.6 1.7 (should be)
But my roll sum's always is NULL
.
My PHP
script is
($sum_number + (SELECT SUM(roll_sum) FROM table_name))
But, if I manually put first number to roll_sum
than script counting another rows fine.
How do I make script work fine?