• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Liutauras Vilda
  • Henry Wong
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Mikalai Zaikin
  • Himai Minh

how to program page wise display?

 
Ranch Hand
Posts: 184
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
an example of what am asking can be found in main page of this jdbc topic..
that is if there are 200 rows i was to display 20 rows of data in each page.. how to do this..
this should be done dynamically ..i.e if the row changes to 230 the page should be increased along with the rows..
hope u guys got what is said..i tried out using session array?
need a code for this logic if there is any other logic than using session array..its urgent....
 
Ranch Hand
Posts: 925
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There are probably as many opinions on how to do this as there are forum members. This is my way:
SELECT * FROM (
SELECT ROWNUM MORENUM, NUM, FOO FROM (
SELECT * FROM (
SELECT rownum num, FOO FROM BAR WHERE FOO LIKE( ? )
) ORDER BY NUM DESC
) ORDER BY FOO ASC
) WHERE num <= ? and num > ?;
The very first row contains the starting record number and how many rows in total there are, so when you are displaying a .jsp all the info is easy to get hold of.
Simon
 
senthil sen
Ranch Hand
Posts: 184
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thaks simon,
well when u look at our home page for JDBC u can figure out the number of questions displayed,and the links ...
when u click the links say there are 20 questions displayed in a page,and click of the next link i.e "2" the next link is displayed..
how is this done......???
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic