Guest User

Untitled

a guest
Oct 19th, 2018
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. //Join node table with a field table and search for published nodes of a certain type with a specific field value:
  2. SELECT node.nid AS node_id,
  3. LEFT(node.title, 10) AS node_title, field_data_field_reference_database_id.field_reference_database_id_value as ref_id
  4. FROM node
  5. LEFT JOIN field_data_field_reference_database_id
  6. ON node.nid = field_data_field_reference_database_id.entity_id
  7. WHERE type='location'
  8. AND status='1'
  9. AND field_data_field_reference_database_id.field_reference_database_id_value IS NULL;
Add Comment
Please, Sign In to add comment