diff --git a/server.cpp b/server.cpp index b696b02..3e3da0e 100644 --- a/server.cpp +++ b/server.cpp @@ -89,7 +89,8 @@ int main() ResultSet *res = stmt->executeQuery("call show_category("+to_string(category_id)+");"); int i = 0; - while (res->next()) { + res->afterLast(); + while (res->previous()) { int id = res->getInt("id"); string description = res->getString("description"); int seconds = res->getInt("seconds");