i wasted 2 hours trying to solve this, still trying.
i will appreciate your help in this
SELECT
sum((price-discount) * (quantity+quantity_store))) AS TOTAL_SALES
FROM
orders_items
WHERE
date BETWEEN '{$_GET['start_date']}' AND '{$_GET['end_date']}'
ORDER BY date DESC
I GET THIS ERROR
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') AS TOTAL_SALES FROM orders_items WHERE date BETWEEN ‘2010-02-01’ at line 3
I need to know the total amount of the sales in a specific time