Mass enable/disable comments

If you created nodes and then enabled comments module after that you will have all those nodes without comments. Even if you enable comments for that content type, this will only help on the new nodes created. So to do that you would probably either run some code in phpmyadmin or make action to use with VBO module.

So for drupal 6 we go to phpmyadmin and run this query

Update node set comment = 2 where type = "your_node_type";

and for drupal 7 you need to set it also in node_revision table so it is a bit more complex

UPDATE node as n LEFT JOIN node_revision as nr ON nr.nid=n.nid AND nr.vid=n.vid SET n.comment = 2, nr.comment = 2 WHERE n.type = 'your_node_type'

In both cases number 2 is the STATE of comments, so if it is no.2 it is read/write, 1 is read, and 0 is disabled.

There is also an option with VBO, a bit hidden from normal view. Enable "Modify entity values" action to change the comment status without coding, it should help you also.