I have a table in a MySQL database where one field contains only numbers.
Now I want to pull the sum of those numbers out from the database via PHP. How does one do that?? I’ve tried many different things, but I can’t get it to work.
Let’s say this is the table:
+--------+
| number |
+--------+
| 1 |
| 2 |
| 3 |
+--------+
How can I get the result from the database to be 6 (1+2+3) ?
Thanks
Johan aka kalliban