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