title: insert java check box value into sql
body: <p>Does anyone know how to insert the check box value into sql? All the check boxes value will correspond in one column of the field(Preferences) and will be inserted when the process button has clicked. 
  The coding are as below:</p>
  
  <p><strong>User.java</strong></p>
  
  <pre><code>JButton btnNewButton = new JButton("Process");
          btnNewButton.setBounds(360, 296, 89, 23);
          contentPane.add(btnNewButton);
          btnNewButton.addActionListener(new ActionListener(){
              public void actionPerformed(ActionEvent e){
                  String place=null;
                  String a=(String)comboBox.getSelectedItem().toString();
                  String b=(String)comboBox_1.getSelectedItem().toString();
                  String day=(String)comboBox_2.getSelectedItem().toString();
  
                  if(chckbxLei.isSelected())
                  {
                      place=String.valueOf(chckbxLei.getText());
  
                  }
                  if(chckbxAdv.isSelected())
                  {
                      place=String.valueOf(chckbxAdv.getText());
  
                  }
                  if(chckbxHis.isSelected())
                  {
                      place=String.valueOf(chckbxHis.getText());
  
                  }
                  if(chckbxOut.isSelected())
                  {
                      place=String.valueOf(chckbxOut.getText());
  
                  }
                  if(chckbxFAK.isSelected())
                  {
                      place=String.valueOf(chckbxFAK.getText());
  
                  }
                  Case ca= new Case();
                  try {
                      ca.addPlace(a,b,day,place);
                      LoginGUI um= new LoginGUI();
                      um.setVisible(true);
  
                  } catch (Exception e1) {
                      // TODO Auto-generated catch block
                      e1.printStackTrace();
                  }
  
  
      }       
      });
  </code></pre>
  
  <p><strong>Case.java</strong></p>
  
  <pre><code> public void addPlace( String t, String k, String z,String h) throws Exception{
  
          DatabaseConnection db=new DatabaseConnection();
          Connection connect=db.getConnection();
  
          String sql="Insert into menu(Type,Budget,Day,Preferences)VALUES (?,?,?,?)";
  
          PreparedStatement ps=connect.prepareStatement(sql);
          ps.setString(1,t);
          ps.setString(2,k);
          ps.setString(3,z);
          ps.setString(4,h);
          ps.executeUpdate();
          connect.close();
          ps.close();
      }
  </code></pre>
  
  <p>Everything working fine actually just I need some guidance on how to store multiple check box values in a single column in a MySQL DB. I really need help seriously . Your help would be greatly appreciated :)</p>