I have a table like this:
table: roomMembers
roomid member
0 User1
0 User2
0 User3
1 User1
1 User2
1 User4
etc...
I need a SQL query that will return the roomid where both UserX and UserY is a member, for example, if i was to wrap it in a function it would look like:
findCommonRooms("User1", "User2");
In this particular case it should return an array of 0 and 1.