function comment_node_delete
Implements hook_node_delete().
File
-
modules/
comment/ comment.module, line 1331
Code
function comment_node_delete($node) {
$cids = db_query('SELECT cid FROM {comment} WHERE nid = :nid', array(
':nid' => $node->nid,
))
->fetchCol();
comment_delete_multiple($cids);
db_delete('node_comment_statistics')->condition('nid', $node->nid)
->execute();
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.