Proč neprovést výpočet v databázi?
SELECT SUM(price * sold) as total
FROM `inv`;
EDIT:
SELECT SUM((replace(price, '$', '') + 0) * sold) as total
FROM `inv`;
Proč neprovést výpočet v databázi?
SELECT SUM(price * sold) as total
FROM `inv`;
EDIT:
SELECT SUM((replace(price, '$', '') + 0) * sold) as total
FROM `inv`;