title: Store A List Of Data In Mysql DataBase?
body: <p>i have a list of String Data i would Like to Store in my MySQL database Table in Column "Categories". </p>
  
  <p>Is there a way to store it at a go because its a long list.`   </p>
  
  <pre><code>  public Class PickerView{
    List&lt;string&gt; CategoriesPicker = new List&lt;string&gt;();
    public Button SaveItemsButton = new Button();
    public  PickerView()
      {
  
          CategoriesPicker.Items.Add("Hotels &amp; Travel");
          CategoriesPicker.Items.Add("Restaurant");
          CategoriesPicker.Items.Add("Wholesalers");
          CategoriesPicker.Items.Add("Automotives");
          CategoriesPicker.Items.Add("Pets");
          CategoriesPicker.Items.Add("Musical Instruments Services");
          CategoriesPicker.Items.Add("Specialty Food");
          CategoriesPicker.Items.Add("Food");
          CategoriesPicker.Items.Add("Boutique");
          CategoriesPicker.Items.Add("Home &amp; Gardens");
          CategoriesPicker.Items.Add("Shopping");
          CategoriesPicker.Items.Add("Education");
          CategoriesPicker.Items.Add("Books,Mags,Music &amp; Video");
          CategoriesPicker.Items.Add("Fashion");
          CategoriesPicker.Items.Add("Event Planning &amp; Services");
          CategoriesPicker.Items.Add("Arts &amp; Craft");
          CategoriesPicker.Items.Add("Local Services");
          CategoriesPicker.Items.Add("NightLife(Bars..)");
  
          SaveItemsButton.Clicked += SavedItemsButton_Clicked
      }
      private void SavedItemsButton_Clicked(object sender, System.EventArgs e)
      {
           string sqlstring = "server=; port= ; user id =;Password= ;Database=test;";
          MySqlConnection conn = new MySqlConnection(sqlstring);
          try
          {
              conn.Open();
          }
          catch (MySqlException ex)
          {
              throw ex;
          }
          string Query = "INSERT INTO test.maintable (Categories)values('" +(**//I DONT KNOW WHAT TO WRITE HERE TO SAVE ALL AT ONCE**) + "');";
          MySqlCommand cmd = new MySqlCommand(Query, conn);
          cmd.ExecuteReader();
          conn.Close();
      }
   }`
  </code></pre>
  
  <p>How do i save the list of items in <code>CategoriesPicker</code> in database when <code>SaveItemsButton</code> is clicked.</p>