I have this query in my .phtml file.
//Retrieve the read connection $readConnection = Mage::getSingleton('core/resource')->getConnection('core_read'); $sql = "SELECT DATE_FORMAT(created_at,'%d-%m-%Y') AS order_date,COUNT(entity_id) AS total_orders FROM sales_flat_order WHERE DATE_FORMAT(created_at,'%Y-%m-%d') >= '2018-01-01' GROUP BY DATE_FORMAT(created_at,'%Y-%m-%d')"; $result = $readConnection->fetchAll($sql);
I want to generate chart using this data without install any extension.
+---------------+--------------+ | Order Date | Total orders | +---------------+--------------+ | 01-01-2018 | 287 | +---------------+--------------+ | 05-01-2018 | 125 | +---------------+--------------+ | 07-01-2018 | 27 | +---------------+--------------+ | 10-01-2018 | 75 | +---------------+--------------+
Can I do it..?