Posts: 12
Threads: 3
Joined: Jul 2015
Reputation:
0
Hello.
I have one problem.How can I save a lot of data in sql table with INSERT? I need to insert about 50 columns in table when player is registered to server.
Posts: 1,506
Threads: 13
Joined: Jun 2015
50 fucking what? You really need to do your database organization and normalization if you've so much fields to put data for.
An example would be such as weapons data that is often saved in the players table should be saved separately, the houses and businesses should be loaded from their own table regardless if it's purchased or not by the player, etc.
You should show us the table so we can help you out
Posts: 508
Threads: 9
Joined: Dec 2010
Reputation:
0
Why you don't set a default value for all the columns you don't need to INSERT data for? Like for example 'admin', it can be default 0 when a player registers, and so there are more fields.
Posts: 12
Threads: 3
Joined: Jul 2015
Reputation:
0
Okay I did it with default values and it works as expected but now how can I save and load player data?
Posts: 80
Threads: 7
Joined: Sep 2018
Reputation:
0
Search for it, search for saving and loading systems, ton of examples and tutorials.
Posts: 12
Threads: 3
Joined: Jul 2015
Reputation:
0
Yes I know how to save player with sqlite but if I need to save just small amount of data,but I do not know how to save large amount of data in UPDATE query