function votingapi_delete_results in Voting API 6.2
Same name and namespace in other branches
- 6 votingapi.module \votingapi_delete_results()
- 7.2 votingapi.module \votingapi_delete_results()
Delete cached vote results from the database.
Parameters
$vote_results: An array of vote results to delete. Minimally, each vote result must have the 'vote_cache_id' key set.
File
- ./
votingapi.module, line 307 - A generalized voting API for Drupal.
Code
function votingapi_delete_results($vote_results = array()) {
if (!empty($vote_results)) {
$vids = array();
foreach ($vote_results as $vote) {
$vids[] = $vote['vote_cache_id'];
}
db_query("DELETE FROM {votingapi_cache} WHERE vote_cache_id IN (" . db_placeholders($vids) . ")", $vids);
}
}