--- a/displayAgency.php +++ b/displayAgency.php @@ -113,12 +113,16 @@ "contractStart", "supplierName" FROM contractnotice WHERE ' . $yearQ . ' "agencyName" LIKE :agency AND "childCN" IS NULL - ORDER BY "value" DESC LIMIT 100'; + ORDER BY "value" DESC'; +if ($yearQ == '') $query .=' LIMIT 1000'; $query = $conn->prepare($query); $query->bindParam(":agency", $agency); $query->execute(); databaseError($conn->errorInfo()); - +if ($query->rowCount() > 999 && $yearQ == '') { +// if 1000 records warn too many results +print " More than 1000 results found so only first 1000 shown. Please filter by year to see all results "; +} echo "

Contracts

Contract Notice Number