You are here

function votingapi_select_single_vote_value in Voting API 6.2

Same name and namespace in other branches
  1. 6 votingapi.module \votingapi_select_single_vote_value()
  2. 7.2 votingapi.module \votingapi_select_single_vote_value()

Retrieve the value of the first vote matching the criteria passed in.

File

./votingapi.module, line 537
A generalized voting API for Drupal.

Code

function votingapi_select_single_vote_value($criteria = array()) {
  if ($votes = votingapi_select_votes($criteria, 1)) {
    return $votes[0]['value'];
  }
}