I have three tables:
ITEMS
itemid | itemname
1      | Item 1
FEATURES
featureid | featurename
1         | feature1
2         | feature2
3         | feature3
4         | feature4
...       | ...
ASSIGN
assignid | itemid | featureid
1        | 1      | 1
1        | 1      | 2
1        | 1      | 3
1        | 1      | 4
I want one query that will give me a result similar to this:
ITEMS
itemid | itemname | featurename1 | featurename2  | etc
1      | Item 1   | feature1     | feature2      | etc
Is there a way to do this without having a second query? I swear I'm just thinking about it in the wrong way? Any ideas?
Note: features could be anything from 0 to 50 different features. Is my database design perhaps wrong?
 
     
    