Skip to content

Instantly share code, notes, and snippets.

@Steven-Rose
Created December 3, 2012 23:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Steven-Rose/4199020 to your computer and use it in GitHub Desktop.
Save Steven-Rose/4199020 to your computer and use it in GitHub Desktop.
Drupal: Title/Page URLs
SELECT node.nid, node.type, node_revision.title, url_alias.alias AS url, if(node.changed = 0,FROM_UNIXTIME(node.created),FROM_UNIXTIME(node.changed)) AS last_modified
FROM node INNER JOIN node_revision ON (node.vid = node_revision.vid) INNER JOIN url_alias ON (url_alias.source = CONCAT('node/', node_revision.nid))
WHERE node.status = 1
ORDER BY url;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment