Deleting XP

Read log files for errors! If this fails, come here for help

Moderator: Forum Moderator

Post Reply
Seehank
Peon
Posts: 15
Joined: Fri Dec 09, 2005 6:21 am
Location: Slovakia
Contact:

Deleting XP

Post by Seehank » Thu Sep 20, 2007 4:37 am

Hi is it possible to delete someones XP? I use MYSQL to store my XP, just need to know whwre to look :-)

Thanx!


--- Please enter the following information for support ---
War3ft Version: 3.0
Amxmodx Version: 1.76d
Metamod Version: 1.19p32
Cheater Once cheater Forever!

User avatar
YamiKaitou
Forum Moderator
Forum Moderator
Posts: 1925
Joined: Wed Feb 01, 2006 4:33 pm
Contact:

Post by YamiKaitou » Thu Sep 20, 2007 9:47 am

Run this query in MySQL

Code: Select all

DELETE * FROM wc3_player`,`wc3_player_extra`,`wc3_player_race`,`wc3_player_skill`
Image

No support via PM or Email

User avatar
YamiKaitou
Forum Moderator
Forum Moderator
Posts: 1925
Joined: Wed Feb 01, 2006 4:33 pm
Contact:

Post by YamiKaitou » Thu Sep 20, 2007 12:27 pm

Oh, then I read it wrong. If that is the case, I can do it in 2 queries (could be one, but I am to lazy to try and get it to work)

Code: Select all

SELECT `player_id` FROM `wc3_player` WHERE `player_steamid` = 'PUT THE STEAM ID HERE';
DELETE * FROM `wc3_player`,`wc3_player_extra`,`wc3_player_race`,`wc3_player_skill` WHERE `player_id` = 'PUT THE RESULT OF THE LAST QUERY HERE';
Image

No support via PM or Email

Fyrmn472
Peon
Posts: 5
Joined: Fri Oct 05, 2007 3:46 pm

Post by Fyrmn472 » Sat Oct 06, 2007 12:08 am

So if I want to delte all XP in DB, I query this in MySql:

Code: Select all

DELETE * FROM wc3_player`,`wc3_player_extra`,`wc3_player_race`,`wc3_player_skill`
I'm no expert but something doesn't look right.... :?

User avatar
YamiKaitou
Forum Moderator
Forum Moderator
Posts: 1925
Joined: Wed Feb 01, 2006 4:33 pm
Contact:

Post by YamiKaitou » Tue Oct 09, 2007 8:07 am

If you want to delete everyones xp, yes that would be correct
Image

No support via PM or Email

Fyrmn472
Peon
Posts: 5
Joined: Fri Oct 05, 2007 3:46 pm

Post by Fyrmn472 » Wed Oct 10, 2007 11:45 am

That doesn't not work for me. Shouldn't there be a ";" at the end?

User avatar
YamiKaitou
Forum Moderator
Forum Moderator
Posts: 1925
Joined: Wed Feb 01, 2006 4:33 pm
Contact:

Post by YamiKaitou » Wed Oct 10, 2007 12:33 pm

Then try this one

Code: Select all

DROP `wc3_player`,`wc3_player_extra`,`wc3_player_race`,`wc3_player_skill`
Image

No support via PM or Email

Fyrmn472
Peon
Posts: 5
Joined: Fri Oct 05, 2007 3:46 pm

Post by Fyrmn472 » Wed Oct 10, 2007 1:11 pm

I tried the DROP query you provided, restarted the game server, reconnected and levels are still where they were. So I cleared the buffer using "\c" and tried the DELETE query you provided. I restarted the game server, reconnected and levels are still where they were.

Here's what I did:
Image

Did I miss something?

User avatar
YamiKaitou
Forum Moderator
Forum Moderator
Posts: 1925
Joined: Wed Feb 01, 2006 4:33 pm
Contact:

Post by YamiKaitou » Wed Oct 10, 2007 9:35 pm

According to that, you MUST end you command with a semicolon or \g. I use phpMyAdmin for MySQL, but I also don't use MySQL for AmxX stuff (I use SQLite). Turns out that I had the format wrong, here is the correct format

Code: Select all

DROP TABLE `wc3_player`,`wc3_player_extra`,`wc3_player_race`,`wc3_player_skill`
Image

No support via PM or Email

Fyrmn472
Peon
Posts: 5
Joined: Fri Oct 05, 2007 3:46 pm

Post by Fyrmn472 » Wed Oct 10, 2007 9:44 pm

As I suspected, it worked by adding a ";" to the end.

Code: Select all

DROP TABLE `wc3_player`,`wc3_player_extra`,`wc3_player_race`,`wc3_player_skill`;
Thanks

Post Reply