Saving datas to mysql
#2

Not quite correct. If a player can be a member of only ONE faction at a time then you need a column (factionId) in your player table that is a reference to the faction table (id column). The 'leader' column in the faction table goes in the opposite direction and is a reference to the player table.

If a player can be a member of multiple factions at the same time, consult my association table tutorial, linked in my signature.
Reply


Messages In This Thread
Saving datas to mysql - by Zeus666 - 11.07.2016, 20:46
Re: Saving datas to mysql - by Vince - 11.07.2016, 20:57
Re: Saving datas to mysql - by Zeus666 - 12.07.2016, 08:33
Re: Saving datas to mysql - by Zeus666 - 12.07.2016, 15:18
Re: Saving datas to mysql - by Zeus666 - 13.07.2016, 08:33

Forum Jump:


Users browsing this thread: 1 Guest(s)