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();
任何帮助,将不胜感激