--- a/displayProcurementMethod.php +++ b/displayProcurementMethod.php @@ -1,33 +1,33 @@ -<?php - -include_once("./lib/common.inc.php"); -/* - -biggest suppliers in each method -biggest agencies in each method (weighted for size? percentage of total expenditure) - -largest Average value by procurement type? -*/ - -include_header("Procurement Methods"); -$query = 'SELECT SUM(value) as value, "procurementMethod" -FROM contractnotice -WHERE "childCN" is null -GROUP BY "procurementMethod"'; - - $query = $conn->prepare($query); - $query->execute(); - databaseError($conn->errorInfo()); - -echo "<table>"; - foreach ($query->fetchAll() as $row) { -setlocale(LC_MONETARY, 'en_US'); -$value = number_format(doubleval($row[0]),2); - echo ("<tr><td><b>{$row[1]}</b></td><td>\$$value</td></tr>"); -} -echo "</table>"; -include_footer(); -?> - - +<?php +include_once("./lib/common.inc.php"); +/* + +biggest suppliers in each method +biggest agencies in each method (weighted for size? percentage of total expenditure) + +largest Average value by procurement type? +*/ + +include_header("Procurement Methods"); +$query = 'SELECT SUM(value) as value, "procurementMethod" +FROM contractnotice +WHERE "childCN" is null +GROUP BY "procurementMethod"'; + + $query = $conn->prepare($query); + $query->execute(); + databaseError($conn->errorInfo()); + +echo "<table>"; + foreach ($query->fetchAll() as $row) { +setlocale(LC_MONETARY, 'en_US'); +$value = number_format(doubleval($row[0]),2); + echo ("<tr><td><b>{$row[1]}</b></td><td>\$$value</td></tr>"); +} +echo "</table>"; +include_footer(); +?> + + +