unspsc update
[contractdashboard.git] / search.php
blob:a/search.php -> blob:b/search.php
--- a/search.php
+++ b/search.php
@@ -67,11 +67,15 @@
     "contractStart", "supplierName"
     FROM contractnotice
     WHERE ' .$yearQ . ' to_tsvector(\'english\', description) @@ plainto_tsquery(\'english\', :keyword) and "childCN" is null
-    ORDER BY "value" DESC limit 100';
+    ORDER BY "value" DESC limit 1000';
     $query = $conn->prepare($query);
     $query->bindParam(":keyword", $keyword);
     $query->execute();
     databaseError($conn->errorInfo());
+if ($query->rowCount() > 999) {
+// if 1000 records warn too many results
+print "<b> More than 1000 results found so only first 1000 shown. Please filter by year or keyword to see all results </b>";
+}
 echo '<table>';
     foreach ($query->fetchAll() as $row) {
 //print_r($row);