In this table are two columns called tag_id and sub_id. This table is used to link tag names to stories.
I'm trying to write the query for a search. The search is looking for all the sub_id that matches the tag_id given.
Example of what I have currently:
Code: Select all
select distinct(sub_id) from tag_log where tag_id in(101, 102, 103);What's required is for the story to have ALL the three tags. It's should be like a typical search, where the more search terms you enter, the more focused the results will be.