mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2024-11-15 12:48:20 +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");
|
||
|
}
|