Shadez / wowarmory

The World of Warcraft Armory is a vast searchable database of information for World of Warcraft - taken straight from the real servers and presented in a user-friendly interface. Since the Armory pulls its data from the actual game servers, it is the most comprehensive and up-to-date database on the characters, arena teams, guilds, and items of World of Warcraft in existence.
http://getmangos.com/community/showthread.php?t=12096
GNU General Public License v3.0
193 stars 183 forks source link

Sql bug #166

Open Nightstormwow opened 13 years ago

Nightstormwow commented 13 years ago

Hi, i'm using one of de last trinity core serveur and i have a few error in my debug file :

DEBUG [20-08-2011 11:08:12]: ArmoryDatabaseHandler::_query : unable to execute SQL query (SELECT SUM(points) FROM armory_achievement WHERE id IN ()). MySQL error: "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 1" (Error #1064)
DEBUG [20-08-2011 11:08:12]: ArmoryDatabaseHandler::_query : unable to execute SQL query (SELECT SUM(points) FROM armory_achievement WHERE id IN ()). MySQL error: "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 1" (Error #1064)
DEBUG [20-08-2011 11:08:12]: Utils::GetBookmarks : bookmarks for account 11 not found
DEBUG [20-08-2011 11:08:18]: ArmoryDatabaseHandler::_query : unable to execute SQL query (SELECT SUM(points) FROM armory_achievement WHERE id IN ()). MySQL error: "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 1" (Error #1064)
DEBUG [20-08-2011 11:08:18]: ArmoryDatabaseHandler::_query : unable to execute SQL query (SELECT SUM(points) FROM armory_achievement WHERE id IN ()). MySQL error: "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 1" (Error #1064)
DEBUG [20-08-2011 11:08:18]: Utils::GetBookmarks : bookmarks for account 11 not found
DEBUG [20-08-2011 11:08:25]: ArmoryDatabaseHandler::_query : unable to execute SQL query (SELECT SUM(points) FROM armory_achievement WHERE id IN ()). MySQL error: "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 1" (Error #1064)
DEBUG [20-08-2011 11:08:25]: ArmoryDatabaseHandler::_query : unable to execute SQL query (SELECT SUM(points) FROM armory_achievement WHERE id IN ()). MySQL error: "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 1" (Error #1064)
DEBUG [20-08-2011 11:08:26]: ArmoryDatabaseHandler::_query : unable to execute SQL query (SELECT SUM(points) FROM armory_achievement WHERE id IN ()). MySQL error: "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 1" (Error #1064)
DEBUG [20-08-2011 11:08:26]: ArmoryDatabaseHandler::_query : unable to execute SQL query (SELECT SUM(points) FROM armory_achievement WHERE id IN ()). MySQL error: "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 1" (Error #1064)
DEBUG [20-08-2011 11:08:26]: Utils::GetBookmarks : bookmarks for account 11 not found
ERROR [20-08-2011 11:08:28]: Characters::BuildCharacter : player 9 (Shadow) has no data in armory_character_stats table (SQL update to Characters DB was not applied? / Character was not saved in game? / Server core was not patched?)
ERROR [20-08-2011 11:08:28]: Achievements::InitAchievements : wrong player guid (0), ignore.
DEBUG [20-08-2011 11:08:29]: ArmoryDatabaseHandler::_query : unable to execute SQL query (SELECT SUM(points) FROM armory_achievement WHERE id IN ()). MySQL error: "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 1" (Error #1064)
DEBUG [20-08-2011 11:08:29]: ArmoryDatabaseHandler::_query : unable to execute SQL query (SELECT SUM(points) FROM armory_achievement WHERE id IN ()). MySQL error: "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 1" (Error #1064)
DEBUG [20-08-2011 11:08:29]: Utils::GetBookmarks : bookmarks for account 11 not found

The core was correctly patched but no characters can be find in the armory.

Can someone help me please ?

zze commented 13 years ago

Looks like you didn't populate the entire database... Although I am having Issues with displaying any characters. Have you made any progress since lasting posting? (;

Twixix commented 12 years ago

Tracked the problem to line 291 on file class.utils.php

$ach->InitAchievements($realm['guid'], $db);

the error occurs here, it turns out the achievements are loaded for a non existent character achievement or a non populated character database.

i think achievements should not be loaded if there are non.

Twixix commented 12 years ago

Problem is Fixed Go to line 137 in file class.achievements.php

CHANGE

$this->pts = Armory::$aDB->selectCell("SELECT SUM(points) FROM ARMORYDBPREFIX_achievement WHERE id IN (%s)", $this->achievements_id);

TO

$this->pts = Armory::$aDB->selectCell("SELECT SUM(points) FROM ARMORYDBPREFIX_achievement WHERE id IN (%d)", $this->achievements_id);