mirror of
https://github.com/mangosfour/server.git
synced 2025-12-26 07:37:02 +00:00
[7935] Move seldom used access to query data by field names to independent object.
This let not do preparation code for unused later functionlity.
This commit is contained in:
parent
626553c9ee
commit
c3c7187841
12 changed files with 165 additions and 71 deletions
|
|
@ -335,16 +335,16 @@ std::string PlayerDumpWriter::GetDump(uint32 guid)
|
|||
dump += "IMPORTANT NOTE: NOT APPLY ITS DIRECTLY to character DB or you will DAMAGE and CORRUPT character DB\n\n";
|
||||
|
||||
// revision check guard
|
||||
QueryResult* result = CharacterDatabase.Query("SELECT * FROM character_db_version LIMIT 1");
|
||||
QueryNamedResult* result = CharacterDatabase.QueryNamed("SELECT * FROM character_db_version LIMIT 1");
|
||||
if(result)
|
||||
{
|
||||
QueryResult::FieldNames const& namesMap = result->GetFieldNames();
|
||||
QueryFieldNames const& namesMap = result->GetFieldNames();
|
||||
std::string reqName;
|
||||
for(QueryResult::FieldNames::const_iterator itr = namesMap.begin(); itr != namesMap.end(); ++itr)
|
||||
for(QueryFieldNames::const_iterator itr = namesMap.begin(); itr != namesMap.end(); ++itr)
|
||||
{
|
||||
if(itr->second.substr(0,9)=="required_")
|
||||
if(itr->substr(0,9)=="required_")
|
||||
{
|
||||
reqName = itr->second;
|
||||
reqName = *itr;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue