I'm wondering if there's a php function to like add up all the values in the column. for example, i query a bunch of numbers from the size column, and i want to add all of them together. is there a single command to like sumall($rows["size"]); ? or do i have to use something like while theres more rows to get, $sum+$row["size"]=$sum ?
actually sum is part of the SQL language.
see your database documentation for use of the SUM syntax
ie. SELECT id, field, SUM(field) as sum...
aha, that's what i was looking for. thanks a lot, it worked perfectly 🙂 mysql> select sum(size) from eps_list; +-----------+ | sum(size) | +-----------+ | 9253 | +-----------+