bug 1391: fixed syntax in sql statement
authorINOPIAE <inopiae@cacert.org>
Fri, 31 Jul 2015 06:53:09 +0000 (08:53 +0200)
committerINOPIAE <inopiae@cacert.org>
Fri, 31 Jul 2015 06:53:09 +0000 (08:53 +0200)
manager/application/models/User.php

index 83857ca..24b27ed 100644 (file)
@@ -121,7 +121,7 @@ class Default_Model_User {
         $this->points = 100;
 
         $query = "SELECT COUNT(`points`) AS `total` FROM `notary` " .
         $this->points = 100;
 
         $query = "SELECT COUNT(`points`) AS `total` FROM `notary` " .
-            "WHERE `from` = :user AND `method` == 'Face to Face Meeting' AND `from` != `to`";
+            "WHERE `from` = :user AND `method` = 'Face to Face Meeting' AND `from` != `to`";
         $query_params['user'] = $this->id;
         $row = $this->db->query($query, $query_params)->fetch();
         if ($row['total'] === null) $row['total'] = 0;
         $query_params['user'] = $this->id;
         $row = $this->db->query($query, $query_params)->fetch();
         if ($row['total'] === null) $row['total'] = 0;