public static string getPlanTypeEnrollee(int id) { int planid = 0; string plantype; MySqlConnection mycon = connectOutOfSIUE(); MySqlDataReader rd; mycon.Open(); string query = "select plan$id from primaryEnrollee where id=" + id; MySqlCommand cmd = new MySqlCommand(); cmd.Connection = mycon; cmd.CommandText = query; cmd.Prepare(); rd = cmd.ExecuteReader(); while (rd.Read()) { planid = rd.GetInt32(0); } rd.Close(); mycon.Close(); plantype = DBMng.getPlanType(planid); return(plantype); }