more panel/category tables
[contractdashboard.git] / displaySupplier.php
blob:a/displaySupplier.php -> blob:b/displaySupplier.php
--- a/displaySupplier.php
+++ b/displaySupplier.php
@@ -14,8 +14,15 @@
     }
     include_header(str_replace("%", "", $title));
     echo '<center><h1>' . str_replace("%", "", $title) . '</h1></center>';
+if ($supplierABN) {
+    $query = 'SELECT distinct on (lower("supplierName")) "supplierName" from contractnotice where "supplierABN" = :supplierABN';
+    $query = $conn->prepare($query);
+    $query->bindParam(":supplierABN", $supplierABN);
+    $query->execute();
+    databaseError($conn->errorInfo());
+    echo "Also known as: ".implode(', ', $query->fetchAll(PDO::FETCH_COLUMN, 0));
+}
     /*
-     * Common names and uncommon names
      * Procurement method in text, seperate Open via SON from Open
      * Consultancies, Confidentialities percentage
      */