quoteInto() only accepts '?' as place holder
Signed-off-by: Michael Tänzer <neo@nhng.de>
This commit is contained in:
parent
66174d6fb3
commit
e9d2e83670
1 changed files with 6 additions and 7 deletions
|
@ -103,16 +103,15 @@ class AddPointsController extends Zend_Controller_Action
|
||||||
|
|
||||||
// Fix the assurer flag
|
// Fix the assurer flag
|
||||||
$where = array();
|
$where = array();
|
||||||
$query = '`users`.`id` = :user';
|
$query = '`users`.`id` = ?';
|
||||||
$query_params['user'] = $user['id'];
|
$where[] = $this->db->quoteInto($query, $user['id']);
|
||||||
$where[] = $this->db->quoteInto($query, $query_params);
|
|
||||||
$query = 'exists(select * from `cats_passed` as `cp`, ' .
|
$query = 'exists(select * from `cats_passed` as `cp`, ' .
|
||||||
'`cats_variant` as `cv` where `cp`.`variant_id` = `cv`.`id` and ' .
|
'`cats_variant` as `cv` where `cp`.`variant_id` = `cv`.`id` and ' .
|
||||||
'`cv`.`type_id` = 1 and `cp`.`user_id` = :user';
|
'`cv`.`type_id` = 1 and `cp`.`user_id` = ?';
|
||||||
$where[] = $this->db->quoteInto($query, $query_params);
|
$where[] = $this->db->quoteInto($query, $user['id']);
|
||||||
$query = '(select sum(`points`) from `notary` where `to`= :user and ' .
|
$query = '(select sum(`points`) from `notary` where `to`= ? and ' .
|
||||||
'`expire` > now()) >= 100';
|
'`expire` > now()) >= 100';
|
||||||
$where[] = $this->db->quoteInto($query, $query_params);
|
$where[] = $this->db->quoteInto($query, $user['id']);
|
||||||
$this->db->update('users', array('assurer' => 1), $where);
|
$this->db->update('users', array('assurer' => 1), $where);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in a new issue