SA-MP Forums Archive
MySQL Structure - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: MySQL Structure (/showthread.php?tid=604910)



MySQL Structure - K0P - 11.04.2016

Hi,im making a group system and some other things,i need some help making their tables,how can i make a neat table that can store lots of information,like for VIP system i want to store the following information on an existing table (`players`)

Код:
VIP Level

Big Label Slot 1
Slot 2 
Slot 3 

Small Label Slot 1
Slot 2
Slot 3

Pickup Slot 1
Slot 2
Slot 3

And much more info...
But i want to ask that a single table will be able to handle 80+ columns? Because most of the columns will be null if the player is not VIP.


Re: MySQL Structure - Vince - 11.04.2016

A single table probably shouldn't even exceed 15 columns, let alone 80. The way I see it you need at least three tables: your existing player table, a table that lists types (big label, small label, pickup, ...) and an association table that links both of them together.


Re: MySQL Structure - K0P - 11.04.2016

Quote:
Originally Posted by Vince
Посмотреть сообщение
A single table probably shouldn't even exceed 15 columns, let alone 80. The way I see it you need at least three tables: your existing player table, a table that lists types (big label, small label, pickup, ...) and an association table that links both of them together.
Thanks.