English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

I am facing a serious problem of displaying a set of results from the fetched database results

My application needs to display only certain results out the whole of fetched results

I somehow learnt that pagination is a way
Can anyone help me out

J2EE APPLICATION
WEBLOGIC APPLICATION SERVER

2006-09-13 02:36:08 · 2 answers · asked by Ajay Chowdary k 2 in Computers & Internet Programming & Design

2 answers

Pagination is when you have pages and pages of results and use a numbering system such as forums do. eg.
1 2 ... 6 ... 8 9

To only display results that contain your required data you would just request the results that contained that data. In MySQL this would be like

SELECT * FROM table WHERE field=required

or you could use like for wildcard results.

2006-09-13 02:42:55 · answer #1 · answered by carbonize 3 · 0 0

I usually (always) work with PHP and MySQL. But I found this java pagination tutorial at devx.com. The code looks pretty similar to the PHP codes I've used.

Basically, pagination is a method or code that is used to tell your database to return a set of data (based on conditions that you have set in your database query), and to limit that data to a certain number of rows per page, starting from a certain row (and to display that data in a multiple page format as carbonize mentioned before me).

For example, in the following query:
'SELECT * FROM `SomeTable` LIMIT 0, 20'. The "LIMIT 0, 20" would cause the database to yield 20 results per page starting from row 0 (the first row).

Read more at devx.com. As I mentioned before I work with PHP & MySQL. The article below is specifically for Java as far as I can tell.
The 4 page article starts at:
http://www.devx.com/Java/Article/21383/0/page/1

Hope that helps! There's also a link near the bottom of each of those pages that says "Download the code for this article".

2006-09-13 09:50:08 · answer #2 · answered by jarrod 2 · 0 0

fedest.com, questions and answers