1
我正在爲此苦苦掙扎。我想從數據庫中獲取某個值等於某行中某個值的ID列表。此調用可能會返回多個ID。我想將值存儲在列表或列表中的數組中,但是我發現這很麻煩。我的代碼了這裏:C#MySql在C#中存儲多個數據庫行
string strConnection = ConfigurationSettings.AppSettings["ConnectionString"];
MySqlConnection connection = new MySqlConnection(strConnection);
MySqlCommand command = connection.CreateCommand();
MySqlDataReader reader;
command.CommandText = "SELECT idprojects FROM `test`.`projects` WHERE application_layers = " + applicationTiers + "";
connection.Open();
reader = command.ExecuteReader();
任何幫助,將不勝感激