09-25-2010, 04:09 PM
Which is better / faster / less server load* for adding up the value of all rows in one field:
*Generally speaking: not knowing how many rows.
Use Mysql, into a single $result variable:
*Generally speaking: not knowing how many rows.
Use Mysql, into a single $result variable:
Code:
|
or
Something similar to this*
*html table optional, just asking about the PHP part
PHP Code:
|
- Note: I almost decided MySQL would obviously be faster, and deleted the post, but... Is PHP possibly much better for calculations, while MySQL is optimized for i/o?