By daniel sanchez on
I have over 300 nodes of a content type created with CCK. Originally I set comment settings to disabled. Now I want to change that setting to Read/Write. Is there a way to change the setting on all the nodes of that type without having to go and edit each node?
I've changed the settings for that node type but the change only affects new nodes.
Thank you.
Comments
not through the ui afaik,
not through the ui afaik, but you could do it with sql.
===
"Give a man a fish and you feed him for a day. Teach a man to fish and you feed him for a lifetime." - Lao Tzu
"God helps those who help themselves." - Ben Franklin
"Search is your best friend." - Worldfallz
Thanks. So that would be
Thanks. So that would be something like:
SELECT * FROM `node` WHERE `type` = 'workbook_lesson' and `comment` = 0;But I have to write the SQL to change comment to 2. Is that correct?
Sounds about right to me but
Sounds about right to me but i always have to have the db visible with phpmyadmin whenever I write sql, lol.
===
"Give a man a fish and you feed him for a day. Teach a man to fish and you feed him for a lifetime." - Lao Tzu
"God helps those who help themselves." - Ben Franklin
"Search is your best friend." - Worldfallz
Does this seem like the
Does this seem like the correct SQL code?
UPDATE `database_name`.`node` SET `comment` = '2' WHERE `node`.`type` = 'workbook_lesson' LIMIT 1 ;I"m a little afraid of messing with my Drupal install from phpMyAdmin.
Did this go anywhere? I'm
Did this go anywhere? I'm looking at doing the same thing. It's a shame that views bulk operations doesn't have the right action to update the nodes.
I've been kinda afraid to
I've been kinda afraid to try it. Haven't had time to back everything up and be prepared for something nasty to happen.
Success
I did it!
In phpAdmin click on your table.
Go to SQL
Type in:
UPDATE node SET comment = '2' WHERE type = 'your_content_type';
substituting your content type for ''your_content_type
This worked for me but be sure to back up your database first, just in case
Connie
The reverse seems easy!
Just the reverse of what you would like to do!
http://drupal.org/node/363505
www.ZuNOB.com
OK. That worked out well.
OK. That worked out well.