クエリが呼び出されるたびに、それぞれ+1と-1sup
で値を更新しようとしている2つのSQLクエリがあります。opp
最初のクエリ:
query=update disc set sup=@sup, opp=@opp where did=@did
int sup=getnoofsup(did);
int opp = getnoofopp(did);
com.Parameters.AddWithValue("@sup", sups + 1);
com.Parameters.AddWithValue("@opp", opps - 1);
com.Parameters.AddWithValue("@did", did);
com.ExecuteNonQuery();
2番目のクエリ
string query="update disc set sup=sup+1, opp=opp-1 where did=@did" ;
com.Parameters.AddWithValue("@did", did);
com.ExecuteNonQuery();
@sup
と交換するので、インジェクションの2番目のクエリに脅威はありますsup+1
か?