| @@ 216-227 (lines=12) @@ | ||
| 213 | * |
|
| 214 | * @return bool |
|
| 215 | */ |
|
| 216 | public function updateInstance($id, Array $data) |
|
| 217 | { |
|
| 218 | $update = sprintf( |
|
| 219 | "UPDATE %sfaqinstances SET instance = '%s', comment = '%s' WHERE id = %d", |
|
| 220 | PMF_Db::getTablePrefix(), |
|
| 221 | $data['instance'], |
|
| 222 | $data['comment'], |
|
| 223 | (int) $id |
|
| 224 | ); |
|
| 225 | ||
| 226 | return $this->config->getDb()->query($update); |
|
| 227 | } |
|
| 228 | ||
| 229 | /** |
|
| 230 | * Deletes an instance. |
|
| @@ 3263-3274 (lines=12) @@ | ||
| 3260 | * |
|
| 3261 | * @return bool |
|
| 3262 | */ |
|
| 3263 | public function updateQuestionAnswer($openQuestionId, $faqId, $categoryId) |
|
| 3264 | { |
|
| 3265 | $query = sprintf( |
|
| 3266 | 'UPDATE %sfaqquestions SET answer_id = %d, category_id= %d WHERE id= %d', |
|
| 3267 | PMF_Db::getTablePrefix(), |
|
| 3268 | $faqId, |
|
| 3269 | $categoryId, |
|
| 3270 | $openQuestionId |
|
| 3271 | ); |
|
| 3272 | ||
| 3273 | return $this->_config->getDb()->query($query); |
|
| 3274 | } |
|
| 3275 | ||
| 3276 | /** |
|
| 3277 | * Returns a part of a query to check permissions. |
|