From: Maxious Date: Sun, 23 Dec 2012 10:01:54 +0000 Subject: heuristics fix X-Git-Url: http://maxious.lambdacomplex.org/git/?p=contractdashboard.git&a=commitdiff&h=a92e5ab5dd023c5e53e463cd0f2191ba5d9eb32f --- heuristics fix --- --- a/heuristics/historyHeuristics.php +++ b/heuristics/historyHeuristics.php @@ -22,8 +22,9 @@ { global $agencyTransactions,$conn; if (!$agencyTransactions[$agencyName]) { - $query = 'select count(*) from contractnotice where "agencyName" = \'' . $agencyName . '"\''; + $query = 'select count(*) from contractnotice where "agencyName" = \'' . pg_escape_string ($agencyName) . '"\''; $result = $conn->query($query); + //echo $query; $r = $result->fetch(PDO::FETCH_BOTH); $agencyTransactions[$agencyName] = $r[0]; }