kris-o3world
-
2/17/2012 12:37:27 PM
RE:Relation between blog & blog Post document
this is what i ended up doing, since DocumentForeignKey had matches for both MenuItemID in CONTENT_MenuItem in addition to BlogPostID in CONTENT_BlogPost...
why isn't there a column to identify the 'content type' associated with DocumentForeignKey?
SELECT t.NodeID, t.NodeAliasPath, d.DocumentID, d.DocumentName, bp.BlogPostID, bp.BlogPostTitle FROM CMS_Tree t, CMS_Document d, CONTENT_BlogPost bp WHERE t.NodeID = d.DocumentNodeID AND d.DocumentForeignKeyValue = bp.BlogPostID AND t.NodeAliasPath LIKE '/blog%' ORDER BY bp.BlogPostID
|