bulk delete bambook 500 books | Рецензії на книги, відгуки про прочитане, рейтинг - кращі книги

You are here

bulk delete bambook 500 books

<?php
error_reporting(E_ALL);
require_once './includes/bootstrap.inc';
drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);

$nodetype = "book";
$uid = 912;
$limit = 100;
$results = db_query("SELECT nid FROM {node} WHERE type='%s' AND uid=%d LIMIT %d", $nodetype, $uid, $limit);

$count = 0;

while ($result = db_fetch_object($results)) {
node_delete($result->nid);
print 'Deleted node: ' . $result->nid . '';
$count++;
}

print "Total deleted: $count";

?>