Getting a category name from a post…?
-
What I’m looking to do is search a specific subcategory from a post.
For example:
Category ‘A’
– subcategory ‘YY’Post ‘DELTA’ has YY category assigned to it.
I have post DELTA’s ID and need to search for assigned categories under category A
In SQL it would be this statement:
“SELECT categories.category_name, sub_category.category_name, posts.[post-name]
FROM posts INNER JOIN (categories AS sub_category INNER JOIN categories ON sub_category.parent_category = categories.ID) ON posts.category = sub_category.ID
WHERE (((posts.[post-name])=”DELTA”));”I just can’t figure out how to translate this into the querystring.
Much Thanks!
-Derek
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Getting a category name from a post…?’ is closed to new replies.