{ while (reader.Read()) { if (reader.HasRows) { JSONstring += "{"; JSONstring += """ + "变量名" + "":"" + reader.GetString("变量") + "","; JSONstring += """ + "变量名" + "":"" + reader.GetString("变量") + "","; JSONstring += """ + "变量名" + "":"" + reader.GetString("变量") + "","; JSONstring += """ + "变量名" + "":"" + reader.GetString("变量") + "","; JSONstring += """ + "变量名" + "":"" + reader.GetString("变量") + "","; JSONstring += """ + "变量名" + "":"" + reader.GetString("变量") + "","; JSONstring += """ + "detail" + """; JSONstring += ":"; JSONstring += "["; MySqlDataReader reader = MysqlHelper.ExecuteReader(" SELECT* FROM table where 条件='条件'");//第二个查询写在这里,里面可以循环多个参数 try { while (readerT.Read()) { if (readerT.HasRows) { JSONstring += "{"; JSONstring += """ + "变量名" + "":"" + reader.GetString("变量") + "","; JSONstring += """ + "变量名" + "":"" + reader.GetString("变量") + "","; JSONstring += """ + "变量名" + "":"" + reader.GetString("变量") + "","; JSONstring += "},"; } } } catch { readerT.Close(); } finally { readerT.Close(); } JSONstring = JSONstring.TrimEnd(specialChars); JSONstring += "]},"; Log.Error(JSONstring, "请求JSONstring页面的JSONstring参数中的值"); } } JSONstring = JSONstring.TrimEnd(specialChars); JSONstring += "]"; }