????java.sql.PreparedStatement????PrepareStatement?????Statement????
????PrepatredStatement?????????????SQL???????PreparedStatement?????????????????????????????Statement????
??????????PreparedStatement?????е?SQL?????????????IN??????IN?????????SQL??????δ?????????????????IN???????????????“??”??????λ????????????????????????????????????Setxxx????????
???????????£?
public void add(BookInfAdd bookinfadd){
String sqlStr ="insert into  booktypeadd values(??????????????????????)";
try (PreparedStatement s =DBconnection.getConnection().prepareStatement(sqlStr)){
s.setString(1??bookinfadd.getType());
s.setString(2??bookinfadd.getBookname());
s.setString(3??bookinfadd.getActor());
s.setString(4??bookinfadd.getChubanshe());
s.setString(5??bookinfadd.getYizhe());
s.setString(6??bookinfadd.getChubanriqi());
s.setString(7??bookinfadd.getDanjia());
s.setInt(8??Integer.parseInt(bookinfadd.getISBN()));
s.executeUpdate();
int result =s.executeUpdate();
if(result>0){
System.out.println("?????");
}
}   catch (SQLException ex) {
ex.printStackTrace();
}
}