Parent Directory
|
Revision Log
|
Revision Graph
empty all posts in a forum. useful for large forums where web UI is too slow, especially because we have no damn 'check all' feature in admin/node
| 1 | <?PHP |
| 2 | |
| 3 | // change the number below to the forum you want emptied. |
| 4 | //then visit this page in your browser or run with command line php |
| 5 | $tid = 2; |
| 6 | |
| 7 | require "./includes/bootstrap.inc"; |
| 8 | drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL); |
| 9 | $sql = 'SELECT nid from term_node where tid=%d'; |
| 10 | $result = db_query($sql, $tid); |
| 11 | while ($row = db_fetch_object($result)) { |
| 12 | node_delete(array('nid' => $row->nid, 'confirm' => 1)); |
| 13 | } |
| ViewVC Help | |
| Powered by ViewVC 1.1.2 |