--- a/graphs/displayMethodCountGraph.php +++ b/graphs/displayMethodCountGraph.php @@ -3,7 +3,7 @@ // Width and height of the graph $width = 800; $height = 300; -$query = "select procurementMethod, count(1) as count, value, MONTH(contractStart) as month, YEAR(contractStart) as year from `contractnotice` +$query = "select procurementMethod, count(1) as count, SUM(value) as value, MONTH(contractStart) as month, YEAR(contractStart) as year from `contractnotice` where $agencyQ $supplierQ childCN = 0 AND YEAR(contractStart) >= 2007 AND YEAR(contractStart) <= 2009 group by procurementMethod,year,month order by procurementMethod,year,month"; $result = mysql_query($query); $methods = Array("Direct","Open","Select");