03.12.2019, 14:08
If you decide to use MySQL and use the table structures Kwarde suggested (which is the correct way to have members in a separate table), I would like to note two things.
1) `Owner` can be foreign key for target users(ID) instead of a VARCHAR column.
2) A simple JOIN is enough to get the members of a certain faction ID:
Member is reserved keyword, this is why it is wrapped around in backticks.
1) `Owner` can be foreign key for target users(ID) instead of a VARCHAR column.
2) A simple JOIN is enough to get the members of a certain faction ID:
pawn Code:
SELECT Name AS User_Name
FROM faction_members
JOIN users u
ON u.ID=`Member`
WHERE faction_id=1;