Download & Extend

how to access list of node IDs of referring nodes

Project:NodeReferrer
Version:6.x-1.0-rc2
Component:Code
Category:support request
Priority:normal
Assigned:Unassigned
Status:active

Issue Summary

I have a bunch of nodes of type A, each of which references several nodes of type B. I used Node Referrer to set up a list of referring nodes on each type B node, as described in the documentation, and that worked great.

Type A also has an integer field. I'd like to put a computed field in each type B node to determine the average of this value over all the type A nodes that reference this node (so all the nodes listed in the Node Referrer field), but I'm having trouble figuring out how to access the list of node IDs of referring nodes.

For example, at http://drupal.org/node/325939 the writer selects from a table called content_field_recordingparts that stores all the node references, but when I tried to do something similar it said the table didn't exist. At http://drupal.org/node/259837, the writer selects field_typeb_to_typea_nid from content_type_typeb, where field_typeb_to_typea is the node referrer field, but when I tried it (replacing typeb_to_typea with my own field name), it says the column doesn't exist.

I'm new to both PHP/MySQL and the Drupal API, so sorry if this is a dumb question...thanks!