title: C# - Can't insert data into MySQL database
body: <p>I am making an application where I scrape a certain website. The website has a bunch of players, and I scrape each one of their profile pages. Their profile pages contains information like Name, Level, World and Last Login date.</p>
  
  <p>So I made an object called Player. And then I add all their data to a list.</p>
  
  <pre><code>public static List&lt;Player&gt; Players = new List&lt;Player&gt; { };
  
  public class Player
      {
          public string Name { get; set; }
          public string Sex { get; set; }
          public string Vocation { get; set; }
          public int Level { get; set; }
          public int Achievements { get; set; }
          public string World { get; set; }
          public string LastLogin { get; set; }
          public string AccountStatus { get; set; }
          public int OnlineStatus { get; set; }
      }
  </code></pre>
  
  <p>I add the data like this:</p>
  
  <pre><code>new Player { Name = playerName, Sex = playerSex, Vocation = playerVocation, Level = playerLevel, Achievements = playerAchievements, World = playerWorld, LastLogin = playerLastLogin, AccountStatus = playerAccountStatus, OnlineStatus = playerOnlineStatus };
  </code></pre>
  
  <p>I now want to add all the players to my MySQL database, but I cannot seem to understand how to insert the data.</p>
  
  <p>I established a connection and I tried to SELECT data and it works fine. So my connection is not bad. But inserting seems to not work.</p>
  
  <p>Here's my code I add to insert the data into the tables:</p>
  
  <pre><code>string connString = "Server=localhost;Port=3306;Database=rookstat;Uid=XXXXXXX;password=XXXXXX;";
  MySqlConnection conn = new MySqlConnection(connString);
  MySqlCommand command = conn.CreateCommand();
  
  foreach (Player rooker in Players)
  {
  command.CommandText = "Insert into rookstayers (id, name, sex, vocation, level, achievements, world, lastlogin, accountstatus, onlinestatus) values('', rooker.Name, rooker.Sex, rooker.Vocation, rooker.Level, rooker.Achievements, rooker.World, rooker.LastLogin, rooker.AccountStatus, rooker.OnlineStatus)";
  conn.Open();
  command.ExecuteNonQuery();
  }
  
  conn.Close();
  </code></pre>
  
  <p>What am I doing wrong? I am unsure about the values i insert. Is it supposed to be rooker.Name or what?</p>