title: Mysql C# update int value by 1
body: <p>I use this method to increase value of logins column by one:</p>
  
  <pre><code>MySqlConnection connect = new MySqlConnection(connectionStringMySql);
  MySqlCommand cmd = new MySqlCommand();
  
  cmd.Connection = connect;
  cmd.Connection.Open();
  
  string commandLine = null;
  commandLine = "UPDATE Users SET logins = (@cur_value := logins) + 1 WHERE id = @id;";
  
  cmd.CommandText = commandLine;
  
  
  cmd.Parameters.AddWithValue("@id", userId);
  
  cmd.ExecuteNonQuery();
  cmd.Connection.Close();
  </code></pre>
  
  <p>And i get this Exception:</p>
  
  <blockquote>
    <p>Fatal error encountered during command execution.</p>
  </blockquote>