--- a/heuristics/heuristics.inc.php +++ b/heuristics/heuristics.inc.php @@ -8,9 +8,11 @@ //include ("valueHeuristics.php"); function runHeuristic($heuristicName, $cn) { + global $conn; // check if already ran - $query = "select count(*) from heuristic_results where heuristic_name = '$heuristicName' and CNID = '{$cn['CNID']}'"; + $query = "select count(*) from heuristic_results where heuristic_name = '$heuristicName' and \"CNID\" = '{$cn['CNID']}'"; $result = $conn->query($query); + databaseError($conn->errorInfo()); $r = $result->fetch(PDO::FETCH_BOTH); if ($r[0] == 0) { // if not, run now