Posts: 723
Threads: 366
Joined: Jun 2016
Hi,
What best way, for example i want to create all days players how much they have score, so i will have to everyday use 'insert into' doing cikle all my players in database and create? for ex:
Code:
/myscore [2016-09-05]
/myscore [2016-09-04]
Posts: 723
Threads: 366
Joined: Jun 2016
Yea. But imaginage i have 10000 players in database, i have to use insert into 10000 times? everytime on new day?
Posts: 6,242
Threads: 8
Joined: Jun 2008
I don't think you are explaining this at all clear enough, and there'll be a better way to handle this.
Posts: 723
Threads: 366
Joined: Jun 2016
I don't know what you don't understand.. Like i want to make log, player can view. Every day log.
Posts: 6,242
Threads: 8
Joined: Jun 2008
You could do that by making the log, each time they play, not every day process 10000 dormant accounts...
Posts: 723
Threads: 366
Joined: Jun 2016
Yes, but how to save information how create that rows, tables. I know like make log last top20, but if there is thousands? ok i create variable
#define MAX_LOGS 1500
#define MAX_LOG_LENGHT 100
new LOGS[ MAX_PLAYERS ][ MAX_LOGS ][ MAX_LOG_LENGHT ];
So i need to save that variable all 1500, can i create that many rows?
Posts: 6,242
Threads: 8
Joined: Jun 2008
Yes you can create that many rows, that is what SQL is for.
Creating variables though is not what you need. You can simply write the info directly to the DB...
You'd only create the variables if you were actually storing it all, in the script itself.
Posts: 723
Threads: 366
Joined: Jun 2016
Yes, but in command everytime call database i think it can harm server