Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Displaying page numbers as links

Status
Not open for further replies.

bertrandkis

Programmer
Jul 26, 2002
101
ZA
Hello Folks!
I need to display about 5000 records from an sql database on a webpage. The page can only display 10 records at a time so I need to create links as those that are displayed on a result page when you perform a search using a search engine on the net.The links will look like this:
Previous 1 2 3 4 5 6 7 8 9 10 11 12 13 15 14 16 17 18 19 20 Next
When the user clicks next the next 20 pages should be displayed, when he clicks on a page numbers 10 records from the database should be listed.
Thank you for your help.
 
Well to start with you have to get the totla number of records
Just say its 100 for now
your Database access code needs to bring back the records 1-10 records and display them. do this in a loop.
At the bottom of the page have just the word Next for now.
When you click that it needs to get the records 11-20

See if you can get that to work then come back here with your code so we can look at it.
DougP, MCP
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top