场景:多对多的关系.
表有2列:UserID和UserChoiche
我在每行中逐个存储用户首选项.(这是最有效的方式吗?)
例:
UserID UserChoiche
Run Code Online (Sandbox Code Playgroud)
mark anna
mark paul
mark john
john mark
在这个例子中,mark选择了3个用户,john选择了1个用户.
John和Mark选择了对方,我需要php才能找到这个db关系.
// php mysql查询,选择指定用户的所有选择(在本例中为mark)
SELECT UserChoiche from exampletable WHERE …