📅  最后修改于: 2022-03-11 14:44:53.193000             🧑  作者: Mango
int GetTribePoints(int Tribe_Id) override
{
int TribePoints;
try
{
TribeDatabase << "SELECT TribePoints FROM TribePoints WHERE TribeId = ?;" << Tribe_Id >> TribePoints;
return TribePoints;
}
catch (const sqlite::sqlite_exception& exception)
{
Log::GetLog()->error("({} {}) Unexpected DB error 10{}", __FILE__, __FUNCTION__, exception.what());
}
}
bool SetTribePoints(int Tribe_Id, int TribePoints) override
{
try
{
TribeDatabase << "UPDATE TribePoints SET TribePoints = ? WHERE TribeId = ?;" << TribePoints << Tribe_Id;
return true;
}
catch (const sqlite::sqlite_exception& exception)
{
Log::GetLog()->error("({} {}) Unexpected DB error 11{}", __FILE__, __FUNCTION__, exception.what());
return false;
}
}