Using pagging techniques - I

2 August 2008

When displaying long lists on the web, we use pagging techniques. In this post, I will show how to do that.

Normally we display 10 or 15 results at a time and the user can scroll through the list. If list is a long one, then it does not make an sense to loat it completely. Loading the complete list in session and then loop through the results is not a nice approach. An approach can be to use pagination tags whihc means fetching and displaying the results one page at a time. Pagination tag removes from the developer the burden of coding for navigation and anchors.

Let me present an example: We do some search and the result count is over 1000. But from our middle tier, we don’t return 1,000 results; instead we limit our query to return 10 or 15 results.

In MySQL, we can do that like this:

SELECT * FROM TABLE WHERE {CONDITION} LIMIT 0, 10.

continued …

del.icio.us:Using pagging techniques - I  digg:Using pagging techniques - I  spurl:Using pagging techniques - I  wists:Using pagging techniques - I  simpy:Using pagging techniques - I  newsvine:Using pagging techniques - I  blinklist:Using pagging techniques - I  furl:Using pagging techniques - I  reddit:Using pagging techniques - I  fark:Using pagging techniques - I  blogmarks:Using pagging techniques - I  Y!:Using pagging techniques - I  smarking:Using pagging techniques - I  magnolia:Using pagging techniques - I  segnalo:Using pagging techniques - I  gifttagging:Using pagging techniques - I

Top Of Page | Trackback

If you found this page useful, consider linking to it. Simply copy and paste the code below into your web site.

It will look like this: Using pagging techniques - I

Leave a Reply