Skip to content

Instantly share code, notes, and snippets.

@mozz100
Last active October 11, 2015 12:17
Show Gist options
  • Save mozz100/3857607 to your computer and use it in GitHub Desktop.
Save mozz100/3857607 to your computer and use it in GitHub Desktop.
Search Drupal node content for a string
SELECT * FROM node_revisions
INNER JOIN node ON node.nid = node_revisions.nid
WHERE body LIKE '%search term%'
AND node.status = 1
AND node_revisions.vid IN (SELECT vid FROM node WHERE status = 1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment