fix value/sum
[contractdashboard.git] / graphs / displayMethodValueGraph.php
blob:a/graphs/displayMethodValueGraph.php -> blob:b/graphs/displayMethodValueGraph.php
--- a/graphs/displayMethodValueGraph.php
+++ b/graphs/displayMethodValueGraph.php
@@ -3,7 +3,7 @@
 // Width and height of the graph

 $width = 800;

 $height = 300;

-$query = "select procurementMethod, value, MONTH(contractStart) as month, YEAR(contractStart) as year from `contractnotice`

+$query = "select procurementMethod, 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");