0

hi,
i want to add more details in one page.this is not server side details.just i am using only table to show these details.i want to divide these details in one or more pages in one page.Like
page 1 2 3...
in this place how to use paging.

2
Contributors
2
Replies
3
Views
9 Years
Discussion Span
Last Post by nandhinijp
0

You can find many tutorials on paging, however, I find the best paging to be done through querystrings. You use a simple command line in the querystring, let's say p for page, request the querystring and set the page equal to that. Then, within your SQL, limit the amount of records you get taken in, and start at a new point within the records. In MySQL, it would look something like this:

"SELECT * FROM Users ORDER BY UserName LIMIT " & numRecsPerPage & ", " & (((pageNum-1)*numRecsPerPage)+1)

Now you obviously need more validation, to stop users from typing in letters or allowing negative numbers, in order to prevent an error (have it default to 1).

This would just grab the next amount of records starting at a certain point. I would recommend keeping them ordered. This way you only retrieve the amount of records you need.

0

i am using only html.i found one solution thats virtual paging using script.its working good.
Using that script divide my large page into chunks.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.