CC-5121: fix some SQL statements not being escaped/prepared
This commit is contained in:
parent
21df9013ee
commit
40eb51b892
7 changed files with 87 additions and 65 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue