i need this because i’m merging wordpress with another CMS,
so right now,
i came with :
SELECT a.*,b.*,c.*,d.*
FROM <code>wp_posts</code> a
LEFT JOIN <code>wp_term_relationships</code> b ON ( a.ID = b.object_id)
LEFT JOIN <code>wp_term_taxonomy</code> c ON ( b.term_taxonomy_id = c.term_taxonomy_id )
LEFT JOIN <code>wp_terms</code> d ON (c.term_id = d.term_id )
WHERE post_status = "publish"
AND d.name = "main_menu"
this is ok as it retrieves the menu except it doesn’t get the pages which are included in it in wordpress…don’t know why, i have to change the name of the page so it appears in the menu…
any idea ?
NB: don’t mind the syntax (weird, but it’s the way it is…!)
THANKS