function webform_results_clear in Webform 6.2
Same name and namespace in other branches
- 5.2 webform_report.inc \webform_results_clear()
- 6.3 includes/webform.report.inc \webform_results_clear()
- 7.4 includes/webform.report.inc \webform_results_clear()
- 7.3 includes/webform.report.inc \webform_results_clear()
Delete all submissions for a node.
Parameters
$nid: The node id whose submissions will be deleted.
1 call to webform_results_clear()
File
- ./
webform_report.inc, line 263 - This file includes helper functions for creating reports for webform.module
Code
function webform_results_clear($nid) {
$node = node_load($nid);
$submissions = webform_get_submissions($nid);
foreach ($submissions as $submission) {
webform_submission_delete($node, $submission);
}
}