title: How to add two column values to a list
body: <p>How can I add two column value to a list, the two column are in different table. email is in tbl_user table and groupname is in tbl_group table. And I want to use the prefix text for both the email and group name for the auto complete text box. Now with the query I am able to add the email id to the list and when I type arr then email id starting with arr are displayed how can I do it for both groupname and emailID</p>
  
  <pre><code>  public static string[] GetCompletionList(string prefixText, int count, string contextKey)
  {
             MySqlCommand command = new MySqlCommand();
  
  
      string textforlist = "SELECT tbl_user.Email from tbl_user WHERE tbl_user.OrganisationID = '1' AND UserActive='Yes'AND tbl_User.Email like '" + prefixText + "%'";
      DataSet ds = new DataSet();
      MySqlParameter[] param = new MySqlParameter[1];
      param[0] = new MySqlParameter("@OrganisationID", MySqlDbType.Int32);
      param[0].Value = count;
      command.Parameters.AddWithValue("@OrganisationID", count);
      using (DataServer server = new DataServer())
      {
  
          ds = server.ExecuteQuery(CommandType.Text, textforlist, param);
  
      }
      string textforlist1 = "SELECT tbl_group.GroupName from tbl_group WHERE tbl_group.OrganisationID = '1' AND GroupActive='Yes'AND tbl_group.GroupName like '" + prefixText + "%'";
      DataSet ds1 = new DataSet();
      using (DataServer server = new DataServer())
      {
  
          ds1 = server.ExecuteQuery(CommandType.Text, textforlist1, param);
  
      }
      List&lt;string&gt; cityList = new List&lt;string&gt;();
      for (int i = 0; i &lt; ds.Tables[0].Rows.Count; i++)
      {
          cityList.Add(ds.Tables[0].Rows[i][0].ToString());
          cityList.Add(ds1.Tables[0].Rows[i][0].ToString());
      }
      return cityList.ToArray();
  }
  </code></pre>