| @@ 300-308 (lines=9) @@ | ||
| 297 | /** | |
| 298 | * @return bool | |
| 299 | */ | |
| 300 | public function delete() | |
| 301 |     { | |
| 302 |         $sql = sprintf('DELETE FROM %s WHERE storyid = %u', $this->table, $this->storyid); | |
| 303 |         if (!$result = $this->db->query($sql)) { | |
| 304 | return false; | |
| 305 | } | |
| 306 | ||
| 307 | return true; | |
| 308 | } | |
| 309 | ||
| 310 | /** | |
| 311 | * @return bool | |
| @@ 313-321 (lines=9) @@ | ||
| 310 | /** | |
| 311 | * @return bool | |
| 312 | */ | |
| 313 | public function updateCounter() | |
| 314 |     { | |
| 315 |         $sql = sprintf('UPDATE %s SET counter = counter+1 WHERE storyid = %u', $this->table, $this->storyid); | |
| 316 |         if (!$result = $this->db->queryF($sql)) { | |
| 317 | return false; | |
| 318 | } | |
| 319 | ||
| 320 | return true; | |
| 321 | } | |
| 322 | ||
| 323 | /** | |
| 324 | * @param $total | |
| @@ 328-336 (lines=9) @@ | ||
| 325 | * | |
| 326 | * @return bool | |
| 327 | */ | |
| 328 | public function updateComments($total) | |
| 329 |     { | |
| 330 |         $sql = sprintf('UPDATE %s SET comments = %u WHERE storyid = %u', $this->table, $total, $this->storyid); | |
| 331 |         if (!$result = $this->db->queryF($sql)) { | |
| 332 | return false; | |
| 333 | } | |
| 334 | ||
| 335 | return true; | |
| 336 | } | |
| 337 | ||
| 338 | public function topicid() | |
| 339 |     { | |