CC-5121: fix some SQL statements not being escaped/prepared

This commit is contained in:
denise 2013-05-09 15:53:12 -04:00
parent 21df9013ee
commit 40eb51b892
7 changed files with 87 additions and 65 deletions

View file

@ -297,10 +297,10 @@ class Application_Model_User
public static function getUserCount()
{
$con = Propel::getConnection();
$sql_gen = "SELECT count(*) AS cnt FROM cc_subjs";
$query = $con->query($sql_gen)->fetchColumn(0);
$query = Application_Common_Database::prepareAndExecute($sql_gen, array(),
Application_Common_Database::COLUMN);
return ($query !== false) ? $query : null;
}