1 #include "fetch_current_tournament.h"
3 FetchCurrentTournament::FetchCurrentTournament(Tournament *tourn) : tourn(tourn) {}
4 void FetchCurrentTournament::operator() (pqxx::transaction<> &t)
6 pqxx::result res( t.exec("SELECT * FROM bigscreen.active_tournament NATURAL JOIN tournaments") );
8 pqxx::result::tuple tournament = res.at(0);
10 tourn->id = tournament["tournament"].as(tourn->id);
11 tourn->name = tournament["tournamentname"].as(tourn->name);
12 } catch (PGSTD::out_of_range &e) {