function _votingapi_distinct_values in Voting API 5
2 calls to _votingapi_distinct_values()
File
- ./
votingapi.module, line 598
Code
function _votingapi_distinct_values($field = 'tag', $table = 'vote') {
static $cached;
if (!isset($cached[$table][$field])) {
$results = db_query("SELECT DISTINCT %s FROM {votingapi_%s}", $field, $table);
while ($result = db_fetch_object($results)) {
$cached[$table][$field][] = $result->{$field};
}
}
return $cached[$table][$field];
}