add amendments metric
[contractdashboard.git] / displayCategory.php
blob:a/displayCategory.php -> blob:b/displayCategory.php
--- a/displayCategory.php
+++ b/displayCategory.php
@@ -5,11 +5,20 @@
     echo "<center><h1>".$_REQUEST['category']."</h1></center>";

   $query = "SELECT CNID, description, value, agencyName, category, contractStart, supplierName

     FROM `contractnotice`

-    WHERE childCN = 0 

+    WHERE childCN is null 

     AND category = '" . $_REQUEST['category'] . "'

     ORDER BY value DESC";

   $result = mysql_query($query);

-  echo "<table>";

+    echo "<table>  <thead>

+    <tr>

+      <th>Contract Notice Number</th>

+      <th>Contract Description</th>

+      <th>Total Contract Value</th>

+      <th>Agency</th>

+      <th>Contract Start Date</th>

+      <th>Supplier</th>

+    </tr>

+  </thead>";

   while ($row = mysql_fetch_array($result, MYSQL_BOTH)) {

     setlocale(LC_MONETARY, 'en_US');

     $value = number_format(doubleval($row['value']) , 2);

@@ -30,10 +39,15 @@
     include_header("Categories");

 $query = "SELECT sum(value), category

 FROM `contractnotice`

-WHERE childCN = 0 

+WHERE childCN is null

 GROUP BY category ORDER BY sum(value) DESC ";

 $result = mysql_query($query);

-echo "<table>";

+  echo "<table>  <thead>

+    <tr>

+      <th>Category</th>

+      <th>Total Contracts Value</th>

+    </tr>

+  </thead>";

 while ($row = mysql_fetch_array($result, MYSQL_BOTH)) {

   setlocale(LC_MONETARY, 'en_US');

   $value = number_format(doubleval($row[0]) , 2);