public int delete(int id) {
int row = 0;
try {
conn = getConnection();
String sql = "delete from master where id = ?";
stmt = conn.prepareStatement(sql);
//索引值>0
stmt.setInt(1,id);
//rst = stmt.executeQuery();
row = stmt.executeUpdate();
//rst = stmt.executeQuery();
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}finally {
closeAll();
}
return row;
}