abdujalil  chuliev

abdujalil chuliev

  • NA
  • 400
  • 41.1k

single to multiple

Aug 23 2015 1:21 AM
This method is returning only single value,
but it has to be multiple.
What should I do?
private string getImage_ID()
{
MySqlConnection con = new MySqlConnection(constr);
con.Open();
string query = "Select Arrive_Img_ID,Leave_Img_ID from register where Students_ID='" + getStudent_ID() + "'";
MySqlCommand cmd = new MySqlCommand(query);
cmd.Connection = con;
MySqlDataReader reader = cmd.ExecuteReader();
string i = reader.ToString();
while (reader.Read())
{
i = reader["Arrive_Img_ID"].ToString();
}
reader.NextResult();
while (reader.Read())
{
i = reader["Leave_Img_ID"].ToString();
}
reader.Close();
return i;
}
Please in asp.net.

Answers (1)