Friday, 15 May 2015

sql server - Retrieving item with multiple tags appended -


I want to get a post where it matches multiple tags
I can get all the tags per post , But not around the other

This is my schema

  Posted: POST_ID, POST_BODY  

Then I have a

   Tag Tags: TAG_ID, TAG_NAME   

PT table: PT_POSTID, PT_TAGID

tag This is one of the many relationships to post. I can get all the positions where TAG_ID = 1
but how can I get a post where both Tagged = 1 and tag = 2 are ahead?

SELECT * PT_POSTID from PT group

Is this what you ask questions Was it or did I do wrong in this question?

No comments:

Post a Comment