atr_review_delete_multiple

Versions
6.1
atr_review_delete_multiple($rids)

Delete multiple reviews.

Parameters

$rids An array with the RIDs of the reviews to delete.

Code

atr/atr.module, line 480

<?php
function atr_review_delete_multiple($rids) {
  module_invoke_all('atr_review_delete', $rids);
  foreach ($rids as $rid) {
    atr_cache_static_del('review_' . $rid);
  }
  $placeholders = db_placeholders($rids);
  db_query("DELETE FROM {atr_review} WHERE rid IN ($placeholders)", $rids);
  db_query("DELETE FROM {atr_review_method} WHERE rid IN ($placeholders)", $rids);
  db_query("DELETE FROM {atr_string_location} WHERE sid IN (SELECT sid FROM {atr_string} s WHERE rid IN ($placeholders))", $rids);
  db_query("DELETE FROM {atr_string} WHERE rid IN ($placeholders)", $rids);
}
?>