डेटाबेस में गणना क्यों नहीं करते?
SELECT SUM(price * sold) as total
FROM `inv`;
संपादित करें:
SELECT SUM((replace(price, '$', '') + 0) * sold) as total
FROM `inv`;
डेटाबेस में गणना क्यों नहीं करते?
SELECT SUM(price * sold) as total
FROM `inv`;
संपादित करें:
SELECT SUM((replace(price, '$', '') + 0) * sold) as total
FROM `inv`;