Ejemplo n.º 1
0
 static function deleteLoan($_loanId)
 {
     $loan = self::getLoan($_loanId);
     $objectId = $loan["LoanObject"];
     if (Db::execute("DELETE FROM Loans\n            WHERE LoanId = ?", $_loanId)) {
         return Db::execute("UPDATE Objects\n                                SET ObjectIsLent = 0\n                                WHERE ObjectID = ?", $objectId);
     } else {
         return false;
     }
 }
Ejemplo n.º 2
0
 static function deleteRight($_objectId, $_userId)
 {
     return Db::execute("DELETE FROM RightExceptions\n                                WHERE RightExceptionObject = ? AND RightExceptionUser = ?", array($_objectId, $_userId));
 }
Ejemplo n.º 3
0
 static function setUserMobileToken($_userId, $_value)
 {
     return Db::execute("UPDATE Users\n                SET UserMobileToken = ?\n                WHERE UserId = ?", array($_value, $_userId));
 }