Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Additional information: Could not find specified column in results: admin
- public int getLevel()
- {
- string sqlCommand = "Select level from users where username = 'admin'";
- int value = 0;
- MySqlConnection con = new MySqlConnection("host=45.37.80.181;user=admin;password=V9_PfUYP2gqG!cuJTgyh;database=tcg;");
- MySqlCommand cmd = new MySqlCommand(sqlCommand, con);
- con.Open();
- MySqlDataReader reader = cmd.ExecuteReader();
- while (reader.Read())
- {
- value += int.Parse(reader.GetString("admin"));
- }
- return value;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement