make chart from custome queries using amcharts widget

Comparing #2 with #3

Revision #3 was created by trond trond on Aug 5, 2013, 11:25:51 AM.

Added formatting

Content

Use this code in your view,make sure to put EAmChartWidget in your extension folder. here is the url of widget http://www.yiiframework.com/extension/eamchartwidget/
 
 
 
```php 
<?php
$query ="SELECT count(*) as totalCalls,prov_destname as destination FROM `calls` WHERE status LIKE 'HUNGUP' AND startdate BETWEEN '$dateFrom' AND '$dateTo' AND customerID ='".Yii::app()->session['customerID']."' GROUP BY prov_destname ORDER BY totalCalls DESC LIMIT 5";
$connection = Yii::app()->db;
[...]
)
));
?>

 
```