mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2024-12-23 05:53:34 +00:00
12 lines
303 B
C++
12 lines
303 B
C++
|
#include "SQLiteDatabase.h"
|
||
|
|
||
|
std::optional<bool> SQLiteDatabase::IsPlaykeyActive(const int32_t playkeyId) {
|
||
|
auto [_, keyCheckRes] = ExecuteSelect("SELECT active FROM `play_keys` WHERE id=?", playkeyId);
|
||
|
|
||
|
if (keyCheckRes.eof()) {
|
||
|
return std::nullopt;
|
||
|
}
|
||
|
|
||
|
return keyCheckRes.getIntField("active");
|
||
|
}
|