Hello!
Here's my problem. I have a many-to-many table called 'user_has_personalities'. In my application, users can have many personalities, and a personality can belong to many users.
The table has two integer columns, user_id and personality_id.
What I need to do is get all users that have at least all of the personalities (a set of personality_ids of variable size) which I supply to the query.
For an example, I'd like to get all users that have personalities with ids 4, 5, 7, but can also have some other personalities. But I need the query to work for a variable number of wanted personality ids, like 4, 5, 7, 9, 10 for an example.
Any ideas?