deleting an individual players stats?

General forum for discussions regarding UTStatsDB
TONYTOC
Posts: 28
Joined: Thu Apr 23, 2009 12:30 pm

deleting an individual players stats?

Postby TONYTOC » Mon May 18, 2009 2:33 pm

UTStatsDB version 3.06 standalone
windows 2003 server
PHP version 5
Unreal Tournament 3
UT3 stats 1.04
sqlite

On our server one player amounted a ranking, in less than an hour over three matches, that surpasses any other player by over 140,000 points. My question is there any way to delete one players stats since something went askew with this individuals ranking. I would hate to have to reset everyone but cant keep it it as is right now since it would be impossible for anyone to surpass this illegitimate ranking. All his other stats look fine so i dont suspect foul play of any sort just something went amiss when calculating his ranking.

Panther
Site Admin
Posts: 500
Joined: Sat Dec 08, 2007 12:51 am
Contact:

Re: deleting an individual players stats?

Postby Panther » Mon May 18, 2009 3:26 pm

You can download the SQLite command line utility then execute it against the UTStatsDB database:
sqlite c:\utstatsdb\utstatsdb.db

Then you can reset the player's rank points via:
update ut_playersgt set gt_rank=0.0 where gt_pnum=<player>;

Replace <player> with the player number you wish to reset.

Use '.quit' to exit.

TONYTOC
Posts: 28
Joined: Thu Apr 23, 2009 12:30 pm

Re: deleting an individual players stats?

Postby TONYTOC » Mon May 18, 2009 3:49 pm

Cool thx Panther.

Hmm i keep getting near D: =syntax error.

I am putting in d:\ustatsdb\ustatsdb.db and then hitting enter i then get ....> and im putting in update ut_playersgt set gt_rank=0.0 where gt_pnum=495; and then enter. Is this the right procedure?

Panther
Site Admin
Posts: 500
Joined: Sat Dec 08, 2007 12:51 am
Contact:

Re: deleting an individual players stats?

Postby Panther » Tue May 19, 2009 9:42 am

You select the database as part of the command line when you run sqlite:

C:\> sqlite d:\ustatsdb\ustatsdb.db
SQLite version 2.8.17
Enter ".help" for instructions
sqlite> ut_playersgt set gt_rank=0.0 where gt_pnum=495;

TONYTOC
Posts: 28
Joined: Thu Apr 23, 2009 12:30 pm

Re: deleting an individual players stats?

Postby TONYTOC » Tue May 19, 2009 12:01 pm

Sry to keep bothering you on something that is probably pretty simple but im still struggling. This is what i keep getting...
playergt.jpg
playergt.jpg (99.89 KiB) Viewed 8652 times
Is this because im using a newer version of sqlite to try and alter the datatbase or does that not matter? :?

Panther
Site Admin
Posts: 500
Joined: Sat Dec 08, 2007 12:51 am
Contact:

Re: deleting an individual players stats?

Postby Panther » Tue May 19, 2009 1:22 pm

Sry to keep bothering you on something that is probably pretty simple but im still struggling. This is what i keep getting...
playergt.jpg
Is this because im using a newer version of sqlite to try and alter the datatbase or does that not matter? :?
I'm guessing that you probably have it installed in "utstatsdb", not "ustatsdb".

TONYTOC
Posts: 28
Joined: Thu Apr 23, 2009 12:30 pm

Re: deleting an individual players stats?

Postby TONYTOC » Tue May 19, 2009 2:08 pm

omg what a DUH. It still does not work however. I keep getting a sql error near "ut_playersgt", but i give up, ill just reset the whole thing. Thx again for you help though.

TONYTOC
Posts: 28
Joined: Thu Apr 23, 2009 12:30 pm

Re: deleting an individual players stats?

Postby TONYTOC » Thu May 21, 2009 1:00 pm

Ok i guess im not ready to give up the ghost on this yet. Ill explain what i have done for you so you, hopefully, can see what noob mistake i have made.
:downloaded sqlite3 commandline program precompiled binary for windows
:put sqlite3 .exe in c:\windows\system32 folder
:run cmd
:the rest you can see in the pick
I did double check on the .db file to ensure i had full control of file which i do. All permissions are granted.
deletingplayer.jpg
deletingplayer.jpg (254.58 KiB) Viewed 8621 times

Panther
Site Admin
Posts: 500
Joined: Sat Dec 08, 2007 12:51 am
Contact:

Re: deleting an individual players stats?

Postby Panther » Thu May 21, 2009 2:15 pm

It's possible that the 3.x version of the SQLite command line tool might not be compatible with the 2.x database version used by PHP. Download the 2.x version, preferably 2.8.17.

Panther
Site Admin
Posts: 500
Joined: Sat Dec 08, 2007 12:51 am
Contact:

Re: deleting an individual players stats?

Postby Panther » Thu May 21, 2009 2:52 pm

I recall now that it wasn't very easy to find.
Attachments
sqlite-2_8_17.zip
sqlite.exe version 2.8.17
(130.47 KiB) Downloaded 246 times

TONYTOC
Posts: 28
Joined: Thu Apr 23, 2009 12:30 pm

Re: deleting an individual players stats?

Postby TONYTOC » Thu May 21, 2009 2:58 pm

lol sry i found it and deleted my post but to late. I found it with filefront with no trouble. Feel free to ignore me. :D




and im happy to say that did the trick. Thx for being patient.

TONYTOC
Posts: 28
Joined: Thu Apr 23, 2009 12:30 pm

Re: deleting an individual players stats?

Postby TONYTOC » Fri Jul 24, 2009 3:40 pm

Is there an easier way to reset all player rankings to 0.0 than doing each pnum individually?

Panther
Site Admin
Posts: 500
Joined: Sat Dec 08, 2007 12:51 am
Contact:

Re: deleting an individual players stats?

Postby Panther » Fri Jul 24, 2009 4:22 pm

Is there an easier way to reset all player rankings to 0.0 than doing each pnum individually?
Sure, simply leave out the "where" statement and the part after it.

Cockbite
Posts: 9
Joined: Fri Jul 24, 2009 6:21 pm

Re: deleting an individual players stats?

Postby Cockbite » Fri Jul 24, 2009 10:22 pm

How would I delete a player completely?

I have two profiles and I want to delete one from the database after merging them. I suppose I could just change the name is the logs before I parse them.

TONYTOC
Posts: 28
Joined: Thu Apr 23, 2009 12:30 pm

Re: deleting an individual players stats?

Postby TONYTOC » Sat Jul 25, 2009 12:43 am

Thanks Panther. (whew, i thought i might have to reset over 4000 players individually).


Return to “UTStatsDB”