Varför inte göra beräkningen i databasen?
SELECT SUM(price * sold) as total
FROM `inv`;
EDIT:
SELECT SUM((replace(price, '$', '') + 0) * sold) as total
FROM `inv`;
Varför inte göra beräkningen i databasen?
SELECT SUM(price * sold) as total
FROM `inv`;
EDIT:
SELECT SUM((replace(price, '$', '') + 0) * sold) as total
FROM `inv`;