You are here

function votingapi_select_single_vote_value in Voting API 7.2

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

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

File

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

Code

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