Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


Nikhilkumar
Filtering
1 Answer(s)      3 years and 9 months ago
Posted in : Java Beginners


I want my result from data base coming after executint select query fitered by some key words so plase give me the suggestion


Advertisement
View Answers

April 6, 2011 at 4:04 PM


import java.sql.*;
class  Retrieve{
public static void main(String[] args){
    try{
        int id=2;
           Class.forName("com.mysql.jdbc.Driver");
           Connection con = DriverManager.getConnection("jdbc:mysql://localhost:3306/test", "root", "root");
           Statement st=con.createStatement();
           ResultSet rs=st.executeQuery("select * from employee where id="+id+"");
           if(rs.next()){
              System.out.println("Name: "+rs.getString("name"));
              System.out.println("Address: "+rs.getString("address"));
              System.out.println("Contact No: "+rs.getInt("contactNo"));
              System.out.println("Email: "+rs.getString("email"));
           }
    }
    catch(Exception e){
    System.out.println(e);
    }

    }
}


Related Tutorials/Questions & Answers:
Traversing through filtering
Traversing through filtering       Traversing through filtering Using jQuery, you can... filtering. Miscellaneous Traversing Tree traversal. Traversing through
Advertisements
Dojo Filtering Select
Dojo Filtering Select         In this section, you will learn about the dojo filtering... to user to enter your text in the  filteringselect. Try Online: Filtering
sorting and filtering the displayed table data using jsp and xml
sorting and filtering the displayed table data using jsp and xml  I have created a xml file and a jsp file, which uses DOM parser to display the content of xml file in web page. Now I would like to sort and filter those data
Text Editor Extensions
Text Editor Extensions       ETEE is an Eclipse plug-in which extends the Eclipse text editors with some extra capabilities for filtering the text using command line
Problem With Combo Box Editable Property
Problem With Combo Box Editable Property  Hi I am new To Flex i had set Combo Box Editable Property as true. But I didn't get the property filtering in the combo box like when you enter text "S" in the combo box then the names
Java file filter
files, this is said to be filtering the files. The interface  FilenameFilter provides the logic of filtering. It will display a list of files with some
Velocity Web Edit
Outline With XML Node Filtering and Intuitive Images * Smart Indenting
Setting a Filter on a Logger Handler in Java
the filtering facility that means when you set a filter on a logger object, the filter... creates a logger object that assists for filtering the data and it has three classes... and NumFilter class provides the facility for filtering data that implements
File download security.
; In this script, filter_var() is used for filtering the file and valid
for-each loop in java
. for-each loop is not used for filtering. Example :  A program using
Miscellaneous Traversing
() This method ends the most recent filtering operation in the current chain
dhtmlxCombo - Ajax Autocomplete Combobox
. Filtering mode 6. Autocomplete mode 7. Editable mode   Four modes:  
Security Measure of Website
the security aspect by error checking through forms, filtering output
Data Provider Controls in Flex
functionality of data accessing, sorting, filtering and other collection functionalities
ClearBI
will be able to work with report (sorting, filtering, grouping, export to Microsoft
Introduction to Filter I/O Streams
. These methods performs some sort of filtering operations on the data and cannot.... FilterIntputStream and FilterOutputStream do not perform any filtering
Artifactory Maven, Artifactory 1.2.5, Maven 2 Enterprise Repository Released
supports remote Maven1 repositories proxying. * Backup Cleanup and Filtering - Automatic cleanup of old backups according to a retention period, plus filtering
Not able to filter rows of jtable with textfield in netbeans
not working means it is not filtering data and even i am not getting any exception
Not able to filter rows of jtable with textfield in netbeans
not working means it is not filtering data and even i am not getting any exception
Sitemap Linux Tutorial
Color Picker | Dojo drag and drop | Dojo Editor | Dojo Filtering
Email - Electronic mail
hosting companies will provide you round the clock support, spam filtering
Mysql Date Filter
rows in set (0.00 sec) Query for filtering the record by date:- The given
Jaret Table
excel integrated filtering (autofilter-style, customizable) and sorting
ESftp
excel integrated filtering (autofilter-style, customizable) and sorting
Open Source JMS
* Persistence using JDBC * Local transactions * Message filtering using SQL92-like
doubt in connecting mysql in flex - XML
want to show and on which column enable filtering; Click on Finish and thats all
doubt in connecting to mysql in flex - XML
you want to show and on which column enable filtering; Click on Finish and thats
PHP Filter
, and filtering easier which are the essential part of web application development... Sanitization: Similarly there is another type of filtering is offered by PHP, called
VoIP Routers
content filtering. Versions are also available with an ISDN interface and a built... Vigor2800VG includes features such as VLAN, QoS, Content filtering, VPN support for up
Use of Image I/O library
of a filtering operation. The class ConvolveOp provides a correlation from
 

 

 

DMCA.com