mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-18 23:51:28 +00:00
SetHideMe converted to QueryDatabase
This commit is contained in:
parent
e753685ceb
commit
b379bdd36e
@ -48,18 +48,14 @@ SharedDatabase::~SharedDatabase() {
|
|||||||
|
|
||||||
bool SharedDatabase::SetHideMe(uint32 account_id, uint8 hideme)
|
bool SharedDatabase::SetHideMe(uint32 account_id, uint8 hideme)
|
||||||
{
|
{
|
||||||
char errbuf[MYSQL_ERRMSG_SIZE];
|
std::string query = StringFormat("UPDATE account SET hideme = %i WHERE id = %i", hideme, account_id);
|
||||||
char *query = 0;
|
auto results = QueryDatabase(query);
|
||||||
|
if (!results.Success()) {
|
||||||
if (!RunQuery(query, MakeAnyLenString(&query, "UPDATE account SET hideme = %i where id = %i", hideme, account_id), errbuf)) {
|
std::cerr << "Error in SetGMSpeed query '" << query << "' " << results.ErrorMessage() << std::endl;
|
||||||
std::cerr << "Error in SetGMSpeed query '" << query << "' " << errbuf << std::endl;
|
|
||||||
safe_delete_array(query);
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
safe_delete_array(query);
|
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
uint8 SharedDatabase::GetGMSpeed(uint32 account_id)
|
uint8 SharedDatabase::GetGMSpeed(uint32 account_id)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user