|
|
|
@ -136,10 +136,14 @@ int main()
|
|
|
|
crow::json::wvalue entries;
|
|
|
|
crow::json::wvalue entries;
|
|
|
|
|
|
|
|
|
|
|
|
ResultSet *res = stmt->executeQuery("SELECT * FROM mins_left_to_practice_today;");
|
|
|
|
ResultSet *res = stmt->executeQuery("SELECT * FROM mins_left_to_practice_today;");
|
|
|
|
|
|
|
|
|
|
|
|
res->next();
|
|
|
|
res->next();
|
|
|
|
double time_left = res->getDouble("time_left");
|
|
|
|
double time_left = res->getDouble("time_left");
|
|
|
|
entries = {{"time_left", time_left}};
|
|
|
|
|
|
|
|
|
|
|
|
ResultSet *res2 = stmt->executeQuery("SELECT * FROM mins_practiced_today;");
|
|
|
|
|
|
|
|
res2->next();
|
|
|
|
|
|
|
|
double time_practiced = res2->getDouble("mins_practiced");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
entries = {{"time_left", time_left},{"mins_practiced_today", time_practiced}};
|
|
|
|
|
|
|
|
|
|
|
|
delete res;
|
|
|
|
delete res;
|
|
|
|
return entries;
|
|
|
|
return entries;
|
|
|
|
|