Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- String sal="";
- if(request.getParameter("txt1")!=null)
- {
- int n1=Integer.parseInt(request.getParameter("text1"));
- try{
- Class.forName("com.mysql.jdbc.Driver");
- Connection cnn=DriverManager.getConnection("jdbc:mysql://localhost/dbhp", "root", "");
- Statement st=cnn.createStatement();
- String str="Select * from emp where salary>"+ n1;
- ResultSet rs = st.executeQuery(str);
- }
- catch(Exception ex)
- {
- }
- }
- >%String sal="";
- if(request.getParameter("txt1")!=null)
- {
- int n1=Integer.parseInt(request.getParameter("text1"));
- try{
- Class.forName("com.mysql.jdbc.Driver");
- Connection cnn=DriverManager.getConnection("jdbc:mysql://localhost/dbhp", "root", "");
- Statement st=cnn.createStatement();
- String str="Select * from emp where salary>"+ n1;
- ResultSet rs = st.executeQuery(str);
- }
- catch(Exception ex)
- {
- }
- }
- >%
Add Comment
Please, Sign In to add comment