daily pastebin goal
63%
SHARE
TWEET

Untitled

a guest Sep 21st, 2016 57 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Additional information: Could not find specified column in results: admin
  2.    
  3. public int getLevel()
  4.     {
  5.         string sqlCommand = "Select level from users where username = 'admin'";
  6.         int value = 0;
  7.  
  8.         MySqlConnection con = new MySqlConnection("host=45.37.80.181;user=admin;password=V9_PfUYP2gqG!cuJTgyh;database=tcg;");
  9.         MySqlCommand cmd = new MySqlCommand(sqlCommand, con);
  10.  
  11.         con.Open();
  12.  
  13.         MySqlDataReader reader = cmd.ExecuteReader();
  14.  
  15.         while (reader.Read())
  16.         {
  17.             value += int.Parse(reader.GetString("admin"));
  18.         }
  19.         return value;
  20.     }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top