mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2024-12-23 22:13:35 +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");
|
||
|
}
|