Page 1 of 1

deleting an individual players stats?

Posted: Mon May 18, 2009 2:33 pm
by TONYTOC
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.

Re: deleting an individual players stats?

Posted: Mon May 18, 2009 3:26 pm
by Panther
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.

Re: deleting an individual players stats?

Posted: Mon May 18, 2009 3:49 pm
by TONYTOC
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?

Re: deleting an individual players stats?

Posted: Tue May 19, 2009 9:42 am
by Panther
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;

Re: deleting an individual players stats?

Posted: Tue May 19, 2009 12:01 pm
by TONYTOC
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 8649 times
Is this because im using a newer version of sqlite to try and alter the datatbase or does that not matter? :?

Re: deleting an individual players stats?

Posted: Tue May 19, 2009 1:22 pm
by Panther
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".

Re: deleting an individual players stats?

Posted: Tue May 19, 2009 2:08 pm
by TONYTOC
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.

Re: deleting an individual players stats?

Posted: Thu May 21, 2009 1:00 pm
by TONYTOC
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 8618 times

Re: deleting an individual players stats?

Posted: Thu May 21, 2009 2:15 pm
by Panther
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.

Re: deleting an individual players stats?

Posted: Thu May 21, 2009 2:52 pm
by Panther
I recall now that it wasn't very easy to find.

Re: deleting an individual players stats?

Posted: Thu May 21, 2009 2:58 pm
by TONYTOC
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.

Re: deleting an individual players stats?

Posted: Fri Jul 24, 2009 3:40 pm
by TONYTOC
Is there an easier way to reset all player rankings to 0.0 than doing each pnum individually?

Re: deleting an individual players stats?

Posted: Fri Jul 24, 2009 4:22 pm
by Panther
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.

Re: deleting an individual players stats?

Posted: Fri Jul 24, 2009 10:22 pm
by Cockbite
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.

Re: deleting an individual players stats?

Posted: Sat Jul 25, 2009 12:43 am
by TONYTOC
Thanks Panther. (whew, i thought i might have to reset over 4000 players individually).