5,006
社区成员
发帖
与我相关
我的任务
分享
String sql = "update info set Name = ?,set TLE = ? where id = " + id;
Connection con = JDBCUtils.getConnection();
PreparedStatement pst = con.prepareStatement(sql);
pst.setString(1,Name);
pst.setString(2,TLE);
int n = pst.executeUpdate();
String sql = "update info set Name = ? where id = " + id;
String sql1 = "update info set TLE = ? where id = " + id;
Connection con = JDBCUtils.getConnection();
PreparedStatement pst = con.prepareStatement(sql);
PreparedStatement pst1 = con.prepareStatement(sql1);
pst.setString(1,Name);
pst1.setString(1,TLE);
pst.executeUpdate();
pst1.executeUpdate();