mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-15 16:41:29 +00:00
GetLauncherList converted to QueryDatabase
This commit is contained in:
parent
7f5f805c10
commit
28ec84a6c9
@ -416,26 +416,18 @@ bool WorldDatabase::GetStartZoneSoF(PlayerProfile_Struct* in_pp, CharCreate_Stru
|
|||||||
}
|
}
|
||||||
|
|
||||||
void WorldDatabase::GetLauncherList(std::vector<std::string> &rl) {
|
void WorldDatabase::GetLauncherList(std::vector<std::string> &rl) {
|
||||||
char errbuf[MYSQL_ERRMSG_SIZE];
|
|
||||||
char* query = 0;
|
|
||||||
MYSQL_RES *result;
|
|
||||||
MYSQL_ROW row;
|
|
||||||
|
|
||||||
rl.clear();
|
rl.clear();
|
||||||
|
|
||||||
if (RunQuery(query, MakeAnyLenString(&query,
|
const std::string query = "SELECT name FROM launcher";
|
||||||
"SELECT name FROM launcher" )
|
auto results = QueryDatabase(query);
|
||||||
, errbuf, &result))
|
if (!results.Success()) {
|
||||||
{
|
LogFile->write(EQEMuLog::Error, "WorldDatabase::GetLauncherList: %s", results.ErrorMessage().c_str());
|
||||||
while ((row = mysql_fetch_row(result))) {
|
return;
|
||||||
rl.push_back(row[0]);
|
}
|
||||||
}
|
|
||||||
mysql_free_result(result);
|
for (auto row = results.begin(); row != results.end(); ++row)
|
||||||
}
|
rl.push_back(row[0]);
|
||||||
else {
|
|
||||||
LogFile->write(EQEMuLog::Error, "WorldDatabase::GetLauncherList: %s", errbuf);
|
|
||||||
}
|
|
||||||
safe_delete_array(query);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void WorldDatabase::SetMailKey(int CharID, int IPAddress, int MailKey) {
|
void WorldDatabase::SetMailKey(int CharID, int IPAddress, int MailKey) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user