You are here

function _votingapi_delete in Voting API 6.2

Internal helper function constructs DELETE queries. Don't use unless you're me.

1 call to _votingapi_delete()
votingapi_recalculate_results in ./votingapi.module
Recalculates the aggregate results of all votes for a piece of content.

File

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

Code

function _votingapi_delete($table = 'vote', $criteria = array(), $limit = 0) {
  $query = "DELETE FROM {votingapi_" . $table . "} WHERE 1 = 1";
  $details = _votingapi_query('vote', $criteria, '');
  $query .= $details['query'];
  db_query($query, $details['args']);
}