mirror of
https://github.com/EQEmu/Server.git
synced 2026-01-05 20:53:52 +00:00
UpdateLiveChar converted to StringFormat
This commit is contained in:
parent
6f8e7fc720
commit
4ce7081ace
@ -1540,17 +1540,15 @@ uint32 Database::GetCharacterInfo(const char* iName, uint32* oAccID, uint32* oZo
|
||||
}
|
||||
|
||||
bool Database::UpdateLiveChar(char* charname,uint32 lsaccount_id) {
|
||||
char *query = nullptr;
|
||||
|
||||
auto results = QueryDatabase(query, MakeAnyLenString(&query, "UPDATE account SET charname='%s' WHERE id=%i;",charname, lsaccount_id));
|
||||
std::string query = StringFormat("UPDATE account SET charname='%s' WHERE id=%i;",charname, lsaccount_id);
|
||||
auto results = QueryDatabase(query);
|
||||
|
||||
if (!results.Success())
|
||||
{
|
||||
std::cerr << "Error in UpdateLiveChar query '" << query << "' " << results.ErrorMessage() << std::endl;
|
||||
safe_delete_array(query);
|
||||
return false;
|
||||
}
|
||||
safe_delete_array(query);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user