1<?php
2
3// Drupal 7
4$nid = 5;
5$num_deleted = db_delete('node')
6 ->condition('nid', $nid)
7 ->execute();
8
9// Above example is equivalent to the following in Drupal 6
10$nid = 5;
11db_query("DELETE FROM {node} WHERE nid = %d", $nid);
12
13?>
14