Removing Unguilded in PVP stats on index page

Data Accuracy issues

Removing Unguilded in PVP stats on index page

Postby foreseit » Sun Mar 18, 2007 4:39 pm

Is there away to remove counting Unguilded for "Guild that has suffered the most at our hands" & "Guild that has killed us the most" on the PVP stats box on the roster index page? Having it be that we have lost / won against unguilded individuals the most makes that particular stat meaningless.
<a href="thehateguild.com"><img src="/anetheron/addons/siggen/sig.php?name=Foreseit"></a>
User avatar
foreseit
WR.net Journeyman
WR.net Journeyman
 
Posts: 139
Joined: Tue Jul 25, 2006 10:03 pm

Re: Removing Unguilded in PVP stats on index page

Postby Dracoking007 » Wed May 09, 2007 1:58 am

I would also like a way to make this happen...

Is there a work-around for this?
Dracoking007
WR.net Apprentice
WR.net Apprentice
 
Posts: 9
Joined: Thu Jul 06, 2006 11:04 pm

Removing Unguilded in PVP stats on index page

Postby zanix » Wed May 09, 2007 8:12 am

This will be fixed in Roster 1.8

This edit assumes 'unguilded' is stored in the database as '' (blank or nothing)
If not, then you will need to change it in the database

Basically the SQL query is edited to disregard an empty guild name
We add `guild` != '' AND to the WHERE clause

Open pvplist.php for editing

Find Line 58
Code: Select all
    $query "SELECT `guild`, COUNT(`guild`) AS countg FROM `".ROSTER_PVP2TABLE."` WHERE `win` = '1' AND `enemy` = '1' GROUP BY `guild` ORDER BY countg DESC"


Replace with
Code: Select all
    $query "SELECT `guild`, COUNT(`guild`) AS countg FROM `".ROSTER_PVP2TABLE."` WHERE `guild` != '' AND `win` = '1' AND `enemy` = '1' GROUP BY `guild` ORDER BY countg DESC"



Find Line 83
Code: Select all
    $query "SELECT `guild`, COUNT(`guild`) AS countg FROM `".ROSTER_PVP2TABLE."` WHERE `win` = '0' AND `enemy` = '1' GROUP BY `guild` ORDER BY countg DESC"


Replace with
Code: Select all
    $query "SELECT `guild`, COUNT(`guild`) AS countg FROM `".ROSTER_PVP2TABLE."` WHERE `guild` != '' AND `win` = '0' AND `enemy` = '1' GROUP BY `guild` ORDER BY countg DESC"



Find Line 109
Code: Select all
    $query "SELECT `name`, COUNT(`name`) AS countg FROM `".ROSTER_PVP2TABLE."` WHERE `win` = '1' AND `enemy` = '1' GROUP BY `name` ORDER BY countg DESC"


Replace with
Code: Select all
    $query "SELECT `name`, COUNT(`name`) AS countg FROM `".ROSTER_PVP2TABLE."` WHERE `guild` != '' AND `win` = '1' AND `enemy` = '1' GROUP BY `name` ORDER BY countg DESC"



Find Line 130
Code: Select all
    $query "SELECT `name`, COUNT(`name`) AS countg FROM `".ROSTER_PVP2TABLE."` WHERE `win` = '0' AND `enemy` = '1' GROUP BY `name` ORDER BY countg DESC"


Replace with
Code: Select all
    $query "SELECT `name`, COUNT(`name`) AS countg FROM `".ROSTER_PVP2TABLE."` WHERE `guild` != '' AND `win` = '0' AND `enemy` = '1' GROUP BY `name` ORDER BY countg DESC"
Last edited by zanix on Wed May 09, 2007 8:16 am, edited 3 times in total.
Read the Forum Rules, the WiKi, and Search before posting!
WoWRoster v2.1 - SigGen v0.3.3.523 - WoWRosterDF
User avatar
zanix
Admin
Admin
WoWRoster.net Dev Team
WoWRoster.net Dev Team
UA/UU Developer
UA/UU Developer
 
Posts: 5546
Joined: Mon Jul 03, 2006 8:29 am
Location: Idaho Falls, Idaho
Realm: Doomhammer (PvE) - US

Re: Removing Unguilded in PVP stats on index page

Postby Dracoking007 » Mon May 14, 2007 10:14 pm

Zanix,
That worked like a dream!

Thanks! :thumright:
Dracoking007
WR.net Apprentice
WR.net Apprentice
 
Posts: 9
Joined: Thu Jul 06, 2006 11:04 pm

Removing Unguilded in PVP stats on index page

Postby zanix » Tue May 15, 2007 2:49 am

No problem
Read the Forum Rules, the WiKi, and Search before posting!
WoWRoster v2.1 - SigGen v0.3.3.523 - WoWRosterDF
User avatar
zanix
Admin
Admin
WoWRoster.net Dev Team
WoWRoster.net Dev Team
UA/UU Developer
UA/UU Developer
 
Posts: 5546
Joined: Mon Jul 03, 2006 8:29 am
Location: Idaho Falls, Idaho
Realm: Doomhammer (PvE) - US


Return to Data Accuracy

Who is online

Users browsing this forum: No registered users and 1 guest

cron