在Drupal节点上执行批量操作的MySQL查询

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了在Drupal节点上执行批量操作的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](http://drupal.org/node/134535)
  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';

以上是关于在Drupal节点上执行批量操作的MySQL查询的主要内容,如果未能解决你的问题,请参考以下文章

如何在Drupal7中用代码批量创建节点评论和分类

如何在 drupal 6 中对工作流状态进行批量操作?

Drupal - 为啥在视图中的 SQL 查询中出现“FROM 节点节点”?

mysql中怎样对大批量级的数据查询进行优化

MySQL AutoIncrement--PXC集群批量插入操作获取自增ID异常问题

MySQL 到 Drupal 7 db_select