예제 #1
0
파일: dbs.cs 프로젝트: phill2/ITP5WS2013
        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);
        }
예제 #2
0
파일: dbs.cs 프로젝트: phill2/ITP5WS2013
 private List<String> Read_Max()
 {
     dbc c = new dbc(new SqlCommand("SELECT max(id) FROM Comments"));
     return c.r(1);
 }
예제 #3
0
파일: dbs.cs 프로젝트: phill2/ITP5WS2013
 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);
 }
예제 #4
0
파일: dbs.cs 프로젝트: phill2/ITP5WS2013
 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);
 }
예제 #5
0
파일: dbs.cs 프로젝트: phill2/ITP5WS2013
        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);
        }
예제 #6
0
파일: dbs.cs 프로젝트: phill2/ITP5WS2013
 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);
 }