Hi all,
Need some help with this.
3 tables - Tag_Table, Media_Table, TagXMedia_Table
TagID is primary key of Tag_Table and foreign key in TagXMedia_Table
MediaID is a primary key of MediaTable and a foreign key of TagXMedia_Table
So i can have multiple tags reference multiple media items.
What i want to be able to do is select all the mediaId's from the TagXMedia_Table which have a TagId of x AND x AND x etc
So I am trying to select single MediaID's which have all of the given TagIds - like an AND select statement but accross the rows. I cant do the simple select * from TagXMedia_Table where TagID=1 AND TagID=2 for example as i have actually got:
TagID | MediaID
----------------------
1 | 40
1 | 59
2 | 40
and i want to return 40 in this case.
Hope this makes some sense.
Our community of experts have been thoroughly vetted for their expertise and industry experience.
The Most Valuable Expert award recognizes technology experts who passionately share their knowledge with the community, demonstrate the core values of this platform, and go the extra mile in all aspects of their contributions. This award is based off of nominations by EE users and experts. Multiple MVEs may be awarded each year.
The Distinguished Expert awards are presented to the top veteran and rookie experts to earn the most points in the top 50 topics.