mirror of
https://github.com/EQEmu/Server.git
synced 2026-03-11 15:22:26 +00:00
GetAccountIDFromLSID converted to StringFormat
This commit is contained in:
parent
97588fbcf4
commit
66070e9bf6
@ -1220,17 +1220,15 @@ bool Database::AddToNameFilter(const char* name) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
uint32 Database::GetAccountIDFromLSID(uint32 iLSID, char* oAccountName, int16* oStatus) {
|
uint32 Database::GetAccountIDFromLSID(uint32 iLSID, char* oAccountName, int16* oStatus) {
|
||||||
char *query = nullptr;
|
|
||||||
|
|
||||||
auto results = QueryDatabase(query, MakeAnyLenString(&query, "SELECT id, name, status FROM account WHERE lsaccount_id=%i", iLSID));
|
std::string query = StringFormat("SELECT id, name, status FROM account WHERE lsaccount_id=%i", iLSID);
|
||||||
|
auto results = QueryDatabase(query);
|
||||||
|
|
||||||
if (!results.Success())
|
if (!results.Success())
|
||||||
{
|
{
|
||||||
std::cerr << "Error in GetAccountIDFromLSID query '" << query << "' " << results.ErrorMessage() << std::endl;
|
std::cerr << "Error in GetAccountIDFromLSID query '" << query << "' " << results.ErrorMessage() << std::endl;
|
||||||
safe_delete_array(query);
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
safe_delete_array(query);
|
|
||||||
|
|
||||||
if (results.RowCount() != 1)
|
if (results.RowCount() != 1)
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user