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




Have Programming Question? Ask it here!
 
 
 


Nikhilkumar
Filtering
1 Answer(s)      3 years and 5 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
FileFilter
. There are several file filtering classes and interfaces in Java, which often
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
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
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
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
How to insert multiple checkboxes into Msaccess database J2EE using prepared statement - Java Beginners
you. I'll now work on the filtering part....Thank you. You make it possible
Use of Image I/O library
of a filtering operation. The class ConvolveOp provides a correlation from
SME Server 7.0 Pre 2 has been released now
, which includes virus and spam filtering and webmail 4. File and print sharing 5
IsTra Issue Tracker
enhanced with user-defined filtering. For more information see complete list
Filter Files in Java
Filter Files in Java       Introduction The Filter File Java example code provides the following functionalities: Filtering the files depending on the file
what is the difference between jdk 1.4 and 1.5 and 1.6
, table sorting and filtering, and true swing double-buffering (eliminating
Database books
and copying , *Remote log filtering and downloading * Heartbeat services
JSTL Training
with XSLT Filtering XML Accessing external entities Additional
Game and Graphic Books
of seismic imaging, image artifact filtering, and motion estimation from image data. He
Database books Page16
, *Remote log filtering and downloading * Heartbeat services
Ajax Dojo Tutorial
Filtering Select In this section, you will learn about the dojo filtering select.     Dojo
Open Source E-mail
that has often been labeled as little more than a spam filtering software. In reality... are saturated by virus traffic. There are simple, powerful ways to add virus filtering... can download and use, including virus-filtering tools. Keeping your email clean
SEARCHING THE DATA FROM DATABASE AND DISPLAY THE SEARCHED DATA IN HTML PAGE
preform a bit of filtering $find = strtoupper($find); $find = strip_tags
Web development - Introduction
by error checking through forms, filtering output, and encryption in database
Wi-Fi Security for Public Networks
. A public hotspot also has to do away with encryption and MAC address filtering
IP Filter Example
is an object that perform filtering tasks on request and response. A FilterConfig object
Logging Filter Servlet Example
only HTML so to accomplish these tasks of clients, Filtering is important
VoIP Firewall
Content Filtering protect your Internet access against attacks by hackers
Eclipse Plugin- Editor
the Eclipse text editor with convenient operations for filtering the text. Includes
 

 

 

DMCA.com