public void RefreshCompetitions() { Competition = null; using (IQueryAdapter queryReactor = Yupi.GetDatabaseManager().GetQueryReactor()) { queryReactor.SetQuery("SELECT * FROM rooms_competitions WHERE enabled = '1' LIMIT 1"); DataRow row = queryReactor.GetRow(); if (row == null) { return; } Competition = new RoomCompetition((int)row["id"], (string)row["name"], (string)row["required_furnis"]); } }
public void RefreshCompetitions() { Competition = null; using (IQueryAdapter queryReactor = Yupi.GetDatabaseManager().GetQueryReactor()) { queryReactor.SetQuery("SELECT * FROM rooms_competitions WHERE enabled = '1' LIMIT 1"); DataRow row = queryReactor.GetRow(); if (row == null) return; Competition = new RoomCompetition((int) row["id"], (string) row["name"], (string) row["required_furnis"]); } }