I want to get the past 3 months sales data and display it something like:
August 2018 - $.....
July 2018 - $....
June 2018 - $.....
I have tried something like this:
$this->db->query("SELECT SUM(`order_total`) as `totalSales`
WHERE `order_date` >= LAST_DAY(NOW()) + INTERVAL 1 DAY - INTERVAL 3 MONTH
$results = $this->db->resultSet();
And I tried to put `order_total` in a foreach loop but it just spits out one figure. I am guessing there is something wrong with the SQL query?