Best way to save many values(0,1) [MySQL]
#1

Hi

I have an question about saving values with 0,1..For example i have for licences few variables.I use just 0 and 1(1-Player have license | 0-Player don't have license)

And now i have new variable for all license
Quote:

ShipLicense
DrivingLicense
MotorLicense
AircraftLicense
WeaponLicense

Etc,etc..
Is it good?Or there have better way?For example i'm think about this:
Make an string,text and then use something like this
Код:
0,1,0,1,1
For example it means that player don't have ShipLicense and MotorLicense..But i don't know is better to have more int variables,or an string variable(text in mysql) and then use sscanf maybe?

Thanks in advance
Reply
#2

which is comfortable for u? do as u wish.
but I suggest several tables.
Reply
#3

Okey,now I understand what i need to do in MySQL.Now I just have question about what to do on samp server.

1.
Made 5 variables license(for every license) and load it when player login on server

2. Just Select it from database every time when i need to use it in my mode.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)