fix heuristics
[contractdashboard.git] / heuristics / runHeuristics.php
blob:a/heuristics/runHeuristics.php -> blob:b/heuristics/runHeuristics.php
--- a/heuristics/runHeuristics.php
+++ b/heuristics/runHeuristics.php
@@ -5,10 +5,11 @@
 auth();
 include_once("heuristics.inc.php");
 
-$query = 'SELECT *, agency.abn as "agencyABN", case when "supplierABN" != 0 then "supplierABN"::text else "supplierName" end as "supplierID"
-FROM contractnotice JOIN agency ON contractnotice."agencyName"=agency."agencyName"
+// agency table missing JOIN agency ON contractnotice."agencyName"
+$query = 'SELECT *, case when "supplierABN" != 0 then "supplierABN"::text else "supplierName" end as "supplierID"
+FROM contractnotice 
 WHERE  DATE("importDate") = (select * from (SELECT DATE("importDate") 
-FROM contractnotice ORDER BY "importDate" DESC limit 1) alias) limit 10';
+FROM contractnotice ORDER BY "importDate" DESC limit 1) alias) limit 100';
     $query = $conn->prepare($query);
     $query->execute();
     databaseError($conn->errorInfo());