13.05.2017, 14:09
In that case, your current implementation looks fine.
Unless of course you want to adjust the amount of ranks and make it dynamic. In which case you'd create another table for just ranks with this schema:
(rank precedence, rank name, faction ID)
Then you can grab all the ranks with a SELECT * FROM ranks WHERE factionID = etc... you can have n ranks for every faction, adjust that limit based on some other factor whenever you want and you also have a record for each individual rank allowing you to build other data models around this (for example, you could link a player to a rank and a vehicle to a rank then the lookup becomes a JOIN between those three relations).
Unless of course you want to adjust the amount of ranks and make it dynamic. In which case you'd create another table for just ranks with this schema:
(rank precedence, rank name, faction ID)
Then you can grab all the ranks with a SELECT * FROM ranks WHERE factionID = etc... you can have n ranks for every faction, adjust that limit based on some other factor whenever you want and you also have a record for each individual rank allowing you to build other data models around this (for example, you could link a player to a rank and a vehicle to a rank then the lookup becomes a JOIN between those three relations).



First you are asking to put "params" into "options" and it should basically be a 1 or a 2. Then when it's a 1, you're asking again if params (aka also options) to be placed into chatstyle. Ergo you have the same thing being placed in both "options" and "chatstyle". You could make the code a bit simpler by using it like this for example: