title: java.sql.sqlexception cannot issue executeupdate() or execute large update() for selects
body: <blockquote>
    <blockquote>
      <p>the code give me sqlexception </p>
    </blockquote>
  </blockquote>
  
  <pre><code> int rowsAffected=0;
     Connection con=null;
    try{
        String query="select * from payment WHERE Mid = ? AND date = ?";
            con=DataAccessLayer.getConnection();
    int combo=member.getValue().getId();
     Date date =Date.valueOf(datepicker.getValue());
   PreparedStatement stat=con.prepareStatement(query);
     stat.setDate(2, date);
     stat.setInt(1,combo);
        rowsAffected = stat.executeUpdate();
    }
     catch(Exception exx){
            Platform.runLater(()-&gt;{
               exx.printStackTrace();
  
                });
             return;     
          }
  </code></pre>
  
  <blockquote>
    <blockquote>
      <p>Exception Stack
      java.sql.SQLException: Can not issue executeUpdate() or executeLargeUpdate() for SELECTs
          at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:963)
          at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:896)
          at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:885)
          at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:860)
          at com.mysql.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2045)
          at com.mysql.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2009)
          at com.mysql.jdbc.PreparedStatement.executeLargeUpdate(PreparedStatement.java:5098)
          at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1994)
          at Controllers.MemberbillController.lambda$choice$3(MemberbillController.java:62)
          at java.lang.Thread.run(Thread.java:745)</p>
    </blockquote>
  </blockquote>