Posted By

zachharkey on 04/30/09


Tagged

drupal


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

EkTrOn


MySQL queries for performing bulk operations on Drupal nodes


 / Published in: MySQL
 

Administering more than one node at a time through the Drupal admin interface is like drinking a milkshake through a buckytube.

How to use phpmyadmin and sql to perform mass operations on nodes

  1. # Change the promote setting of all book nodes that are promoted to the front page.
  2. UPDATE `node` SET `promote` = '0' WHERE `type` = 'book' AND `promote` = '1';
  3.  
  4. # Promote all book nodes to the front page
  5. UPDATE `node` SET `promote` = '1' WHERE `type` = 'book' AND `promote` = '0';
  6.  
  7. # Enable commenting for all book pages
  8. UPDATE `node` SET `comment` = '2' WHERE `type` = 'book';

Report this snippet  

You need to login to post a comment.