public List<String> Read_Comments() { SqlCommand st = new SqlCommand("SELECT body, gid, Users.username FROM Comments JOIN Users ON Comments.uid=Users.id");// JOIN Games ON Comments.gid=Games.id"); dbc c = new dbc(st); return c.r(3); }
private List<String> Read_Max() { dbc c = new dbc(new SqlCommand("SELECT max(id) FROM Comments")); return c.r(1); }
public List<String> Read_Users() { SqlCommand st = new SqlCommand("SELECT username, email, id, acctype FROM Users"); dbc c = new dbc(st); return c.r(4); }
public List<String> Read_Login(String usr, String pwd) { SqlCommand st = new SqlCommand("SELECT id, username, acctype FROM Users WHERE username=@una AND password=@pwd"); st.Parameters.Add(new SqlParameter("una", usr)); st.Parameters.Add(new SqlParameter("pwd", pwd)); dbc c = new dbc(st); return c.r(3); }
public List<String> Read_Scores() { SqlCommand st = new SqlCommand("SELECT * FROM Scores");// JOIN Games ON Comments.gid=Games.id"); dbc c = new dbc(st); return c.r(3); }
public List<String> Read_Category(String kat) { SqlCommand st = new SqlCommand("SELECT * FROM Games WHERE kategorie=@kat"); st.Parameters.Add(new SqlParameter("kat", kat)); dbc c = new dbc(st); return c.r(5); }