Hvorfor ikke lave beregningen i databasen?
SELECT SUM(price * sold) as total
FROM `inv`;
EDIT:
SELECT SUM((replace(price, '$', '') + 0) * sold) as total
FROM `inv`;
Hvorfor ikke lave beregningen i databasen?
SELECT SUM(price * sold) as total
FROM `inv`;
EDIT:
SELECT SUM((replace(price, '$', '') + 0) * sold) as total
FROM `inv`;