Fetch offline and online players
#8

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:
pawn Code:
SELECT Name AS User_Name
  FROM faction_members
  JOIN users u
    ON u.ID=`Member`
 WHERE faction_id=1;
Member is reserved keyword, this is why it is wrapped around in backticks.
Reply


Messages In This Thread
Fetch offline and online players - by ImTobi - 29.11.2019, 09:58
Re: Fetch offline and online players - by Mugala - 29.11.2019, 11:00
Re: Fetch offline and online players - by ImTobi - 29.11.2019, 11:03
Re: Fetch offline and online players - by ImTobi - 03.12.2019, 12:27
Re: Fetch offline and online players - by Mugala - 03.12.2019, 13:07
Re: Fetch offline and online players - by Kwarde - 03.12.2019, 13:11
Re: Fetch offline and online players - by Symon - 03.12.2019, 13:30
Re: Fetch offline and online players - by Calisthenics - 03.12.2019, 14:08
Re: Fetch offline and online players - by Joe Staff - 03.12.2019, 15:03
Re: Fetch offline and online players - by Kwarde - 03.12.2019, 16:35

Forum Jump:


Users browsing this thread: 1 Guest(s)