@@ 89-98 (lines=10) @@ | ||
86 | * @return int Returns the number of affected rows on success, and -1 if |
|
87 | * the last query failed. |
|
88 | */ |
|
89 | public function saveActivationFlag() { |
|
90 | return DBCore::doUpdateQuery( |
|
91 | "UPDATE " . static::TABLE_NAME . " |
|
92 | SET activation = ? |
|
93 | WHERE " . static::ID_FIELD_NAME . " = ? |
|
94 | LIMIT 1", |
|
95 | "ii", |
|
96 | [$this->activation, $this->id] |
|
97 | ); |
|
98 | } |
|
99 | ||
100 | /** |
|
101 | * Detects if current record is activated. |
|
@@ 155-164 (lines=10) @@ | ||
152 | * @return int Returns the number of affected rows on success, and -1 if |
|
153 | * the last query failed. |
|
154 | */ |
|
155 | public function saveRemovementFlag() { |
|
156 | return DBCore::doUpdateQuery( |
|
157 | "UPDATE " . static::TABLE_NAME . " |
|
158 | SET removed = ? |
|
159 | WHERE " . static::ID_FIELD_NAME . " = ? |
|
160 | LIMIT 1", |
|
161 | "ii", |
|
162 | [$this->removed, $this->id] |
|
163 | ); |
|
164 | } |
|
165 | ||
166 | /** |
|
167 | * Detects if current record is removed. |