I have to add a bunch of nodes and i normally go by category (around 500 nodes and 20ish categories). but sometimes here and there i forget to click to select the category for the node and i end up placing it under that thing.
Is there a way to generate a list of those types of nodes that werent put into categories/terms?

thanks, this would help me ALOT.

Comments

videojunky’s picture

no suggestions?
even a way to list nodes of "" (null) for the category field. If that is what happens when nodes dont get assigned a category. I dont think it is though.

Rick Cogley’s picture

Well, you could try putting SQL in a PHP snip in a static page. There's a page in the handbook that shows some examples for blocks, so just do create content, page, choose PHP as the input format. May not work quite right if you have other input formats which could affect it.

See also - http://drupal.org/node/20630

Rick Cogley :: rick.cogley@esolia.co.jp
Tokyo, Japan

peterx’s picture

Hello videojunky,
I install phpMyAdmin on every site in a separate directory with Apache security. phpMyAdmin lets you browse tables and sort on columns. If you select the table then click the heading of the category field you will see all the nulls sorted next to each other. It is a quick way of researching all sorts of problems.

You can then experiment with SQL in the phpMyAdmin page and save the SQL for insertion in to a Drupal page for reuse.

Rick Cogley’s picture

phpMyAdmin can be a scary scary thing, tho. Lots of snarling delete buttons right next to benign ones. Gotta be careful using it.

Rick Cogley :: rick.cogley@esolia.co.jp
Tokyo, Japan

videojunky’s picture

I've been using phpMyAdmin to browse my tables before.
From what I see the categorys with nodes are controlled by terms_node table which is seperate from the nodes table
this would make it complicated to cross reference the data and only display rows that dont have corresponding rows in terms_data table from the nodes table.
Thats the only thing I can think of right now and not being advanced with sql queries I dont think I can figure out how to or even if its possible to do cross referencing without some good knowledge on that INNER JOIN syntax for sql queries.
Anybody is welcome to help me write this code, i'll start on it today and post what i come up with later.
Maybe other people can use this.

peterx’s picture

select n.title Node,
	n.nid,
	if(m.title is null, '', m.title) Menu,
	if(d.name is null, '', d.name) Term,
	if(v.name is null, '', v.name) Vocabulary
	from drupal_node n
left join drupal_menu m on m.path = concat('node/', n.nid)
left join drupal_term_node t on t.nid = n.nid
left join drupal_term_data d on d.tid = t.tid
left join drupal_vocabulary_node vn on vn.nid = n.nid
left join drupal_vocabulary v on v.vid = vn.vid
where m.mid is not null or t.tid is not null or v.vid is not null
order by n.title

If you are not using vocabulary node:

select n.title Node,
	n.nid,
	if(m.title is null, '', m.title) Menu,
	if(d.name is null, '', d.name) Term
	from drupal_node n
left join drupal_menu m on m.path = concat('node/', n.nid)
left join drupal_term_node t on t.nid = n.nid
left join drupal_term_data d on d.tid = t.tid
where m.mid is not null or t.tid is not null
order by n.title