1
Fork 0
mirror of https://github.com/SapphireServer/Sapphire.git synced 2025-05-01 08:27:46 +00:00

fixed SQL string

This commit is contained in:
AriAvery 2018-11-23 11:17:02 +01:00
parent 46f6e45a0c
commit d1dc8c937d

View file

@ -388,7 +388,7 @@ std::string Core::ServerMgr::getPlayerNameFromDb( uint32_t playerId )
void Core::ServerMgr::updatePlayerName( uint32_t playerId, const std::string & playerNewName ) void Core::ServerMgr::updatePlayerName( uint32_t playerId, const std::string & playerNewName )
{ {
auto pDb = g_fw.get< Db::DbWorkerPool< Db::ZoneDbConnection > >(); auto pDb = g_fw.get< Db::DbWorkerPool< Db::ZoneDbConnection > >();
pDb->execute( "UPDATE charainfo SET name = '" + playerNewName + "' WHERE name = " + std::to_string( playerId ) ); pDb->execute( "UPDATE charainfo SET name = '" + playerNewName + "' WHERE characterid = " + std::to_string( playerId ) );
m_playerNameMapById[ playerId ] = playerNewName; m_playerNameMapById[ playerId ] = playerNewName;
} }