01.01.2019, 00:20
I got a couple of questions related to MySQL, that I can't seem to find on the internet, I was hoping someone could answer them for me, briefly or in detail.
1. When it comes to accounts, it seems unlikely that I should save everything in one table.
How do you guys suggest I split the tables? What should I put where? For example, password, name, id etc go well together, but should I have a seperate table for weapons, preferences and so on? How long should my tables get? And how would I go from making sure all the tables are linked up/loaded together correctly?
2. When saving data, should I save everything on OnPlayerDisconnect, or seperately when it gets changed? Currently, I have a forward/public that gets called at OnPlayerDisconnect which saves everything. Also, does that cause major issues? Saving a lot of stuff in one go? I imagine it would mess up with a GMX if it becomes too much.
3. Interesting statistics.
How do I go over saving interesting data such as how many players have joined my server on a day, how much time someone has played in total/over a week and so on? I've seen people have such tables but have yet to figure out how it's done, and I can't find any clear guides on it.
I will probably have more questions later on, but for now that's it. Happy New Year and thanks a lot for your help in advance. It's truly appreciated more than you think... Also, if I wasn't ment to post this here, since there's no code involved, I'm extremely sorry.
1. When it comes to accounts, it seems unlikely that I should save everything in one table.
How do you guys suggest I split the tables? What should I put where? For example, password, name, id etc go well together, but should I have a seperate table for weapons, preferences and so on? How long should my tables get? And how would I go from making sure all the tables are linked up/loaded together correctly?
2. When saving data, should I save everything on OnPlayerDisconnect, or seperately when it gets changed? Currently, I have a forward/public that gets called at OnPlayerDisconnect which saves everything. Also, does that cause major issues? Saving a lot of stuff in one go? I imagine it would mess up with a GMX if it becomes too much.
3. Interesting statistics.
How do I go over saving interesting data such as how many players have joined my server on a day, how much time someone has played in total/over a week and so on? I've seen people have such tables but have yet to figure out how it's done, and I can't find any clear guides on it.
I will probably have more questions later on, but for now that's it. Happy New Year and thanks a lot for your help in advance. It's truly appreciated more than you think... Also, if I wasn't ment to post this here, since there's no code involved, I'm extremely sorry.