Say I had a MySQL table which sorts relationships between users (where there is more than 2 columns of users). Whats the best way to check if a user exists in any of a set of columns within the table?
Heres a sample table:
user_relationships('id', 'team', 'teammember1', 'teammember2' 'teammember3' 'teammember4' 'teammember5' 'teammember6' 'teammember7' 'teammember8' 'teammember9');
Thanks in advance,
Ferdia
Where teammmeber1=USER OR teammember2=USER OR teammember3=USER………
I wouldn’t make the table look like that… But that’s your decision
I would make it look like: