function _votingapi_select in Voting API 6.2
Internal helper function constructs SELECT queries. Don't use unless you're me.
2 calls to _votingapi_select()
- votingapi_select_results in ./
votingapi.module - Select cached vote results from the database.
- votingapi_select_votes in ./
votingapi.module - Select individual votes from the database.
File
- ./
votingapi.module, line 580 - A generalized voting API for Drupal.
Code
function _votingapi_select($table = 'vote', $criteria = array(), $limit = 0) {
$query = "SELECT * FROM {votingapi_" . $table . "} v WHERE 1 = 1";
$details = _votingapi_query('vote', $criteria);
$query .= $details['query'];
return $limit ? db_query_range($query, $details['args'], 0, $limit) : db_query($query, $details['args']);
}