I have a view set up that uses a number of relationships to grab content from the correct DB tables. Views PHP does not appear to support relationships, so the only variables I see in the list of those available are those that do not require a relationship. How can I achieve this functionality?


Views Php show fields added to the display of views as available variables. If you want some variable which you got because of the relationship then add the field to the fields to display. If you don't want the field to be displayed to the end user but just want it for computation then check the "Exclude from display" check-box.


Those data are available. See this code (from a join of 3 entities) to see where it is stored:

  $node1  = & $data->_field_data['nid']['entity'];
  $node2 = & $data->_field_data['node_field_data_field_site_ref_nid']['entity'];
  $node3  = & $data->_field_data['field_fixture_ref_node_nid']['entity'];

$node = &$row->nid; will show the nid if I'm not using a relationship.
so for nid using a relationship I've tried:
$node = &$row->nid;
or $node = &$data->nid;
and nothing shows.
I don't understand comment #2.
How do I show the nid that is using a relationship?