Bug in key page and correct

Requests, feedback, and general discussion about WoWRoster
DO NOT post topics about WoWRoster AddOns here!

Bug in key page and correct

Postby titan99 » Wed Feb 14, 2007 12:12 pm

if to use an addons for add level quest to a label of this quest exemple :

[70] The Second and Third Fragments

the key page don't see a good progression for key


to correct this bug in membersinst.php remplace

Code: Select all
function buildSQL($item,$key,$type)
{
   global $wowdb, $selectp, $wherep, $pcount, $selectq, $whereq, $qcount;

   list($iname, $thottnum) = explode('|', $item);

   if ($type == 'quest')
   {
      ++$pcount;
      $selectq .= ", sum(if(quests.quest_name = '".$iname."', 1, 0)) AS $key";
      if ($pcount == 1)
      {
         $whereq .= " quests.quest_name = '".$iname."'";
      }
      else
      {
         $whereq .= " OR quests.quest_name = '".$iname."%";
      }
   }
   else
   {
      ++$qcount;
      $selectp .= ", sum(if(items.item_name = '".$iname."', 1, 0)) AS $key";
      if ($qcount == 1)
      {
         $wherep .= " items.item_name = '".$iname."'";
      }
      else
      {
         $wherep .= " OR items.item_name = '".$iname."'";
      }
   }
}

by
Code: Select all

function buildSQL($item,$key,$type)
{
   global $wowdb, $selectp, $wherep, $pcount, $selectq, $whereq, $qcount;

   list($iname, $thottnum) = explode('|', $item);

   if ($type == 'quest')
   {
      ++$pcount;
      $selectq .= ", sum(if(quests.quest_name LIKE '%".$iname."%', 1, 0)) AS $key";
      if ($pcount == 1)
      {
         $whereq .= " quests.quest_name LIKE '%".$iname."%'";
      }
      else
      {
         $whereq .= " OR quests.quest_name LIKE '%".$iname."%'";
      }
      //echo $whereq."<br>";
   }
   else
   {
      ++$qcount;
      $selectp .= ", sum(if(items.item_name = '".$iname."', 1, 0)) AS $key";
      if ($qcount == 1)
      {
         $wherep .= " items.item_name = '".$iname."'";
      }
      else
      {
         $wherep .= " OR items.item_name = '".$iname."'";
      }
   }
}
User avatar
titan99
Roster AddOn Dev
Roster AddOn Dev
 
Posts: 129
Joined: Sat Jan 13, 2007 8:11 am
Location: Montpellier - France

Bug in key page and correct

Postby zanix » Wed Feb 14, 2007 8:25 pm

Put in as a last minute fix for final release v1.7.3

I edited wowdb to strip out the level in the quest name
Last edited by zanix on Wed Feb 14, 2007 8:39 pm, edited 1 time 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

Bug in key page and correct

Postby titan99 » Thu Feb 15, 2007 11:10 am

after my firts upload i'm bug to uopload file

Quest [] could not be inserted
1062: Duplicate entry '6-' for key 1
User avatar
titan99
Roster AddOn Dev
Roster AddOn Dev
 
Posts: 129
Joined: Sat Jan 13, 2007 8:11 am
Location: Montpellier - France

Bug in key page and correct

Postby zanix » Thu Feb 15, 2007 11:27 am

Yeah, I didn't test the change and confirm it was ok

ALWAYS check the "Official Bugs & Updates" forum for fixes
There is a hot fix there for the error you posted
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 General Support & Feedback

Who is online

Users browsing this forum: No registered users and 1 guest

cron