SoFunction
Updated on 2025-03-09

Batch processing_mysql creates game rankings!

 
First install an msql server on the server "server", and set it to run with the service, and change the root password to kkk. Read the book in detail.
Create a database, such as: mygame, create a table: game
Field: id, data type is int, automatic numbering, indexing, primary key
Field: name, data type text
Field: dir, data type text
Field: num, data type int, default value is 0.
Read the book in detail.
Add a game:
Execute the command line mysql\bin\
Enter: insert into game (name,dir) values ​​('TLBB');
insert into game (name,dir) values ​​('Dreamland,'Mland');

…… ……
Add a line to the client startup program. Copy mysql\bin\ to %windir% in server
Called in the game, such as the Tianlong Bazi:
:run
set gamepath=g:\TLBB
mkdir "%ProgramFiles%\Common Files\Sogou PXP\"
mkdir "%ProgramFiles%\p4p\"
mkdir "%ProgramFiles%\p4p\"
cd /d "%gamepath%"
@echo UPDATE game SET num=num+1 where dir='%cd:g:\=%';>%windir%\temp\
@echo quit>>%windir%\temp\
%windir%\ -hserver -uroot -pkkk mygame<%windir%\temp\

start
exit

All games are added after entering the directory and before executing.

@echo UPDATE game SET num=num+1 where dir='%cd:g:\=%';>%windir%\temp\
@echo quit>>%windir%\temp\
%windir%\ -hserver -uroot -pkkk mygame<%windir%\temp\

The data will be run once and the num value will be +1. It will take two days to study which games are good games and which games should be sent out of the Internet cafe.