Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sql bug #166

Open
Nightstormwow opened this issue Aug 20, 2011 · 3 comments
Open

Sql bug #166

Nightstormwow opened this issue Aug 20, 2011 · 3 comments

Comments

@Nightstormwow
Copy link

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
Copy link

zze commented Sep 16, 2011

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
Copy link

Twixix commented Feb 11, 2012

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
Copy link

Twixix commented Feb 11, 2012

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);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants