Okay, I get an array with multiple user ids from a php script.
Now I have this mysql table:
+ - - - - - - - - - - - + - - - - - +
¦ fk_conversation ¦ fk_user ¦
+ - - - - - - - - - - - + - - - - - +
¦ 1 ¦ 2 ¦
+ - - - - - - - - - - - + - - - - - +
¦ 1 ¦ 3 ¦
+ - - - - - - - - - - - + - - - - - +
¦ 1 ¦ 4 ¦
+ - - - - - - - - - - - + - - - - - +
¦ 2 ¦ 2 ¦
+ - - - - - - - - - - - + - - - - - +
¦ 2 ¦ 4 ¦
+ - - - - - - - - - - - + - - - - - +
If I get the array (2,4) I need to get the fk_conversation key = 2 but if I get the array(2,3,4) I should get the fk_conversation key = 1.
I always want to get the fk_conversation id where all connected fk_user ids are in the array.
1 Answer