You are here

function _webform_submission_delete_submit in Webform 5

File

./webform.inc, line 92

Code

function _webform_submission_delete_submit($form_id, $form_values) {
  $nid = $form_values['nid'];
  $sid = $form_values['sid'];
  db_query('DELETE FROM {webform_submitted_data} WHERE nid = %d AND sid = %d', $nid, $sid);
  db_query('DELETE FROM {webform_submissions} WHERE nid = %d AND sid = %d', $nid, $sid);
  drupal_set_message(t("Submission deleted"));
  drupal_goto('node/' . $nid . '/results');
}