开发者

extracting Drupal node and menu relationships with SQL

I am trying to untangle a complicated multi language Drupal site with custom SQ开发者_StackOverflow中文版L reports.

By poking around I bit I was able to construct this SQL statement which gives me all nodes and helps me find translation relationships.

SELECT  node.nid as node_nid, node.language as node_language, 
        node.type as node_type, node.title as node_title, 
        node.tnid as node_tnid, node.status as node_status, url.src, 
        url.dst, url.language as url_language 
FROM {node} as node 
LEFT JOIN {url_alias} as url 
      ON url.src = CONCAT('node/', node.nid) 
ORDER BY node_type, node_language, node.nid

Now I want to add 'permitted input formats' and publishing options for each node. Also list all menus and what they contain.


You may want to look at the views module, it can save you a lot of time and save you writing custom SQL.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜