summaryrefslogtreecommitdiff
path: root/src/common/Database/Implementation/CharacterDatabase.cpp
diff options
context:
space:
mode:
authorYehonal <yehonal.azeroth@gmail.com>2017-12-21 11:26:43 +0100
committerYehonal <yehonal.azeroth@gmail.com>2017-12-21 11:26:43 +0100
commit403ed2600f39c1105b6641086808a6cdafbca1c5 (patch)
tree0422298438422af22f3f0723dfa62f66e10510f1 /src/common/Database/Implementation/CharacterDatabase.cpp
parentacd60005e833efee3a10a2f1a4aee7ecced4cc97 (diff)
parenta0d17509a2c0b06d9e74c01d3fe7dc4df2c5c9a7 (diff)
Merge branch 'master' of https://github.com/azerothcore/azerothcore-wotlk into dir-restructure
Diffstat (limited to 'src/common/Database/Implementation/CharacterDatabase.cpp')
-rw-r--r--src/common/Database/Implementation/CharacterDatabase.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/common/Database/Implementation/CharacterDatabase.cpp b/src/common/Database/Implementation/CharacterDatabase.cpp
index a656b66884..c1ace0ccaa 100644
--- a/src/common/Database/Implementation/CharacterDatabase.cpp
+++ b/src/common/Database/Implementation/CharacterDatabase.cpp
@@ -136,7 +136,7 @@ void CharacterDatabaseConnection::DoPrepareStatements()
PrepareStatement(CHAR_DEL_ACCOUNT_INSTANCE_LOCK_TIMES, "DELETE FROM account_instance_times WHERE accountId = ?", CONNECTION_ASYNC);
PrepareStatement(CHAR_INS_ACCOUNT_INSTANCE_LOCK_TIMES, "INSERT INTO account_instance_times (accountId, instanceId, releaseTime) VALUES (?, ?, ?)", CONNECTION_ASYNC);
PrepareStatement(CHAR_SEL_MATCH_MAKER_RATING, "SELECT matchMakerRating, maxMMR FROM character_arena_stats WHERE guid = ? AND slot = ?", CONNECTION_SYNCH);
- PrepareStatement(CHAR_SEL_CHARACTER_COUNT, "SELECT account, COUNT(guid) FROM characters WHERE account = ? GROUP BY account", CONNECTION_ASYNC);
+ PrepareStatement(CHAR_SEL_CHARACTER_COUNT, "SELECT ? AS account,(SELECT COUNT(*) FROM characters WHERE account =?) AS cnt", CONNECTION_ASYNC);
PrepareStatement(CHAR_UPD_NAME, "UPDATE characters set name = ?, at_login = at_login & ~ ? WHERE guid = ?", CONNECTION_ASYNC);
PrepareStatement(CHAR_DEL_DECLINED_NAME, "DELETE FROM character_declinedname WHERE guid = ?", CONNECTION_ASYNC);