Thread: Storing data
View Single Post
Airkish
AlliedModders Donor
Join Date: Apr 2016
Location: Lithuania
Old 01-29-2020 , 01:15   Re: Storing data
Reply With Quote #3

Quote:
Originally Posted by Bugsy View Post
Does each skin have all of the columns below? Or are skins in a separate table which has skin_id as PK?
When you say unlimited, what is the max you would ever expect?
How does this data need to be referenced? Is there a steam-id field that you are not showing?

Give some context for your usage of this data.

id (int) - Is this the primary key ID, or player ID
skin_id (int)
nametag (string) - Is this player name or name of skin?
kills (int)
hs (int)
damage (double)
I might have missed some info. Skins are retrieved from .cfg file, I thought about storing them in MySQL but it will take more time to load, right? And how would I go about precaching models then?

id - primary key ID
user_id - user id, references another table
skin_id - skin_id, with this id I retrieve info about skin from skins array
is_stattrak (int) - if true, will allow to level up skin, track hs, kills, damage
level - skin level
kills -
hs -
damage -

I expect user to have ~1000 skins at some point.

This data will be shown in users inventory.
2 types - stattrak and normal (wont track stats)
They will be able to equip them.

PHP Code:
SELECT FROM `user_skinsWHERE user_id '%d' 
PHP Code:
while(SQL_MoreResults(Query)) {
//Storing data, best approach?

__________________
Airkish is offline