public static String  search(int id) {

        boolean result = false;
        Connection con = getcon();
        boolean a=false;
        ResultSet rs = null;
        String name="";
        try {
            String stusql = "select name from testtable where id=? ";
            PreparedStatement stmt = null;
            stmt = con.prepareStatement(stusql);
            stmt.setInt(1,id);


            rs=stmt.executeQuery();
            if (rs.next()) {
                a=true;
                System.out.println("a+result"+a);
                name=rs.getString(1);
            }
        } catch (Exception ex) {
            ex.printStackTrace();
        } finally {
            try {
                con.close();
            } catch (SQLException e) {
                e.printStackTrace();
            }
        }
        return name;
}