我需要一些代码方面的帮助
我有一个名为“stuff”的数据库表,我有以下信息:
+------+-------------+---------------------+
| id | member_id | group_id |
+------+-------------+---------------------+
| 1 | 11 | aa |
+------+-------------+---------------------+
| 2 | 11 | bb |
+------+-------------+---------------------+
| 3 | 22 | bb |
+------+-------------+---------------------+
| 4 | 11 | cc |
+------+-------------+---------------------+
| 5 | 22 | cc |
+------+-------------+---------------------+
| 6 | 33 | cc |
+------+-------------+---------------------+
我需要的:
If I search for group_id when member_id = 11 the result will be aa
If I search for group_id when member_id = 11 AND member_id = 22 the result will be bb
If I search for group_id when member_id = 11 AND member_id = 22 AND member_id = 33 the result will be cc