I have a site with two books, each having about 300-350 pages each. I want to delete one of the book and its child pages.
I was able to load the pages using some custom coding. I also came across, node_delete()
function which has the following code snippet:
db_delete('node')
->condition('nid', $nids, 'IN')
->execute();
db_delete('node_revision')
->condition('nid', $nids, 'IN')
->execute();
db_delete('history')
->condition('nid', $nids, 'IN')
->execute();
db_delete('node_access')
->condition('nid', $nids, 'IN')
->execute();
So, it deletes data from four tables; but I suspect there are other tables, from which the data needs to be deleted as well (one of them being book
table). Could you please point out which of the tables needs to be checked?