mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2024-12-23 14:03:34 +00:00
12 lines
299 B
C++
12 lines
299 B
C++
|
#include "MySQLDatabase.h"
|
||
|
|
||
|
std::optional<bool> MySQLDatabase::IsPlaykeyActive(const int32_t playkeyId) {
|
||
|
auto keyCheckRes = ExecuteSelect("SELECT active FROM `play_keys` WHERE id=?", playkeyId);
|
||
|
|
||
|
if (!keyCheckRes->next()) {
|
||
|
return std::nullopt;
|
||
|
}
|
||
|
|
||
|
return keyCheckRes->getBoolean("active");
|
||
|
}
|