sc = new MySqlCommand("Update tbName set AvgTime=" + avgTimeArray[1]+ " where PatternId=1", msc);
sc.ExecuteNonQuery();
sc = new MySqlCommand("Update tbName set AvgTime=" + avgTimeArray[2]+ " where PatternId=2", msc);
sc.ExecuteNonQuery();
sc = new MySqlCommand("Update tbName set AvgTime=" + avgTimeArray[3]+ " where PatternId=3", msc);
sc.ExecuteNonQuery();
Is it possible to use a loop for this type of query set? If it is possble how to do it? (avgtImeArray is a array)
using
. 3. Use parameterized queries