Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Staggered search results

 
Jenn Person
Ranch Hand
Posts: 89
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I sincerely hope this is an appropriate forum to ask this. I'm making a cd store webapp. I have it so that the user can view lists of cds by genre. However my database has approxiamtely 100-250 cds per category. I want to format the search results so that only a certain amount like 20 or 30 results are shown per page, and links to the rest of the pages of results at the bottom like any search engine. How would I go about this?
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Look up the "LIMIT" keyword. Your RDBMS may use something slightly different.
In a nutshell, it allows you to set the number of records returned.


Also, search this and the JSP forum with the "paging" keyword.
This has been asked (and answered) many times so there is a lot of information here.
[ March 31, 2005: Message edited by: Ben Souther ]
 
Jenn Person
Ranch Hand
Posts: 89
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Awesome!! Thanks Ben, you're always so helpful!!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic