| @@ 2075-2092 (lines=18) @@ | ||
| 2072 | * @since 2006-06-18 |
|
| 2073 | * @author Thorsten Rinne <[email protected]> |
|
| 2074 | */ |
|
| 2075 | function getNumberOfVotings($record_id) |
|
| 2076 | { |
|
| 2077 | $query = sprintf( |
|
| 2078 | 'SELECT |
|
| 2079 | usr |
|
| 2080 | FROM |
|
| 2081 | %sfaqvoting |
|
| 2082 | WHERE |
|
| 2083 | artikel = %d', |
|
| 2084 | PMF_Db::getTablePrefix(), |
|
| 2085 | $record_id); |
|
| 2086 | if ($result = $this->_config->getDb()->query($query)) { |
|
| 2087 | if ($row = $this->_config->getDb()->fetchObject($result)) { |
|
| 2088 | return $row->usr; |
|
| 2089 | } |
|
| 2090 | } |
|
| 2091 | return 0; |
|
| 2092 | } |
|
| 2093 | ||
| 2094 | /** |
|
| 2095 | * Adds a new voting record |
|
| @@ 376-397 (lines=22) @@ | ||
| 373 | * |
|
| 374 | * @return string |
|
| 375 | */ |
|
| 376 | public function getTagNameById($tagId) |
|
| 377 | { |
|
| 378 | if (!is_numeric($tagId)) { |
|
| 379 | return null; |
|
| 380 | } |
|
| 381 | ||
| 382 | $query = sprintf(" |
|
| 383 | SELECT |
|
| 384 | tagging_name |
|
| 385 | FROM |
|
| 386 | %sfaqtags |
|
| 387 | WHERE |
|
| 388 | tagging_id = %d", |
|
| 389 | PMF_Db::getTablePrefix(), |
|
| 390 | $tagId |
|
| 391 | ); |
|
| 392 | ||
| 393 | $result = $this->_config->getDb()->query($query); |
|
| 394 | if ($row = $this->_config->getDb()->fetchObject($result)) { |
|
| 395 | return $row->tagging_name; |
|
| 396 | } |
|
| 397 | } |
|
| 398 | ||
| 399 | /** |
|
| 400 | * Returns the HTML for the Tags Cloud |
|