@@ 2314-2332 (lines=19) @@ | ||
2311 | * |
|
2312 | * @return integer |
|
2313 | */ |
|
2314 | public function getNumberOfVotings($record_id) |
|
2315 | { |
|
2316 | $query = sprintf( |
|
2317 | 'SELECT |
|
2318 | usr |
|
2319 | FROM |
|
2320 | %sfaqvoting |
|
2321 | WHERE |
|
2322 | artikel = %d', |
|
2323 | PMF_Db::getTablePrefix(), |
|
2324 | $record_id); |
|
2325 | if ($result = $this->_config->getDb()->query($query)) { |
|
2326 | if ($row = $this->_config->getDb()->fetchObject($result)) { |
|
2327 | return $row->usr; |
|
2328 | } |
|
2329 | } |
|
2330 | ||
2331 | return 0; |
|
2332 | } |
|
2333 | ||
2334 | /** |
|
2335 | * Adds a new voting record. |
@@ 455-476 (lines=22) @@ | ||
452 | * |
|
453 | * @return string |
|
454 | */ |
|
455 | public function getTagNameById($tagId) |
|
456 | { |
|
457 | if (!is_numeric($tagId)) { |
|
458 | return; |
|
459 | } |
|
460 | ||
461 | $query = sprintf(' |
|
462 | SELECT |
|
463 | tagging_name |
|
464 | FROM |
|
465 | %sfaqtags |
|
466 | WHERE |
|
467 | tagging_id = %d', |
|
468 | PMF_Db::getTablePrefix(), |
|
469 | $tagId |
|
470 | ); |
|
471 | ||
472 | $result = $this->_config->getDb()->query($query); |
|
473 | if ($row = $this->_config->getDb()->fetchObject($result)) { |
|
474 | return $row->tagging_name; |
|
475 | } |
|
476 | } |
|
477 | ||
478 | /** |
|
479 | * Returns the HTML for the Tags Cloud. |