Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Pagination
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Pagination

 Post Reply Post Reply
Author
xeerex View Drop Down
Senior Member
Senior Member


Joined: 19 November 2002
Location: United States
Status: Offline
Points: 601
Post Options Post Options   Thanks (0) Thanks(0)   Quote xeerex Quote  Post ReplyReply Direct Link To This Post Topic: Pagination
    Posted: 15 January 2007 at 11:29pm
Hello everyone,

I'm back to writing some websites in ASP and need to learn how to do some pagination when pulling results from a database. Basically, my results are displayed in standard "table fashion" which makes for a lot of scrolling. I need to have a system similar to that in the forum.

Yes, I can take a look at -borg-'s code as a basis, but I wondered if anyone had a relatively simple script or tutorial?
Back to Top
xeerex View Drop Down
Senior Member
Senior Member


Joined: 19 November 2002
Location: United States
Status: Offline
Points: 601
Post Options Post Options   Thanks (0) Thanks(0)   Quote xeerex Quote  Post ReplyReply Direct Link To This Post Posted: 17 January 2007 at 2:05am
Ok - I've implemented code found here:

http://www.asp101.com/articles/recordsetpaging/index.asp

which seems to work pretty well. Now I've just got to get the display in horizontal rather than all vertical.
Back to Top
ScriptMaster View Drop Down
Newbie
Newbie


Joined: 31 January 2007
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote ScriptMaster Quote  Post ReplyReply Direct Link To This Post Posted: 01 February 2007 at 2:18pm

move the <tr> </tr> outside of the loop

Back to Top
MrMellie View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 December 2006
Location: United Kingdom
Status: Offline
Points: 251
Post Options Post Options   Thanks (0) Thanks(0)   Quote MrMellie Quote  Post ReplyReply Direct Link To This Post Posted: 06 February 2007 at 10:41am
The easiest way to do pagination is use MySQL as the backend database. The LIMIT and OFFSET clauses are designed to do exactly the function you want. No more pulling off 1000 records just to few a small subset of them.

SQL2005 also has a new function (ROW_NUMBER)that can be used to give the same results.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.