I got the following sql query in my aspx page to update my database in phpmyadmin. My software is visual web developer 2010.\[code\] cmd = connection.CreateCommand(); cmd.CommandText = "UPDATE (userscore) SET score = @score WHERE username = @username"; cmd.Parameters.AddWithValue("@username", username); cmd.Parameters.AddWithValue("@score", userscore); var numRowsAffected = cmd.ExecuteNonQuery(); if (numRowsAffected == 0) { cmd.CommandText = "INSERT INTO userscore (username, score)VALUES(@username, @score)"; cmd.ExecuteNonQuery(); }\[/code\]This query adds an username plus is score in the database, when the specific username isn't in the database yet. That's what I want. But when for example the username admin is in the datbase with a score of -1 (in my application you can vote +1 or -1) and he gets another vote of +1, I want to store the sum the values (in this case -1 plus +1 = 0)in the database as the new score, and delete the old value, which in this example is -1.