I have this SQL table :
name | id_photo
================
word1 | 38
word2 | 38
word7 | 39
word1 | 31
word2 | 31
And I would like to research all the id_photo such as name = word1 AND name = word2
for example is this case I would like to have as a return 38,31
Can somebody suggest a solution?
if unique key was not specified on name for each
id_photo, usedistinctinsideCOUNT