I have a table in MySQL called users for example, in that users table there are two rows which contain a numeric value in which I wish to add together.
For arguments sake lets say, this is the table structure
++++++++++++++++++++++++++++++
ROW | Numeric1 | Numberic2
++++++++++++++++++++++++++++++
ROW 1| 38 | 39
ROW 2| 41 | 54
ROW 3| 47 | 41
ROW 4| 73 | 37
ROW 5| 31 | 25
I wish to add the Numeric row 1 and numeric row 2 together and then add it to the next one, so the result would return 426 (the total sum of all of the numbers) using PHP and then echoing the value.
For some reason I cannot use
$total = $numeric1 + numberic2;
echo $total;
Any ideas in how to do this?