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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Limit DB results on page 1

Status
Not open for further replies.

rufc

Programmer
Nov 20, 2001
47
0
0
GB
Hi,

I have made a simple forum for our intranet. Can anyone help me as the list of posts is getting quite long and I would like to limit the results to say 10 per page (and have Page 1 2 3 4 > links at the bottom).

Ho do I go about this? Here is how I gain the results from the DB
Code:
<% while not RS.EOF and not RS.BOF %>
<tr height='25'>
<td bgcolor='#EFEFEF'> <a href="/Forum/Message/index.asp?id=<%=RS("id")%>"><%=RS("title")%></a></td>
<td align="center" bgcolor='#EFEFEF'><%=RS("date_created")%></td>
</tr>
<%RS.movenext
 wend %>
Thanks in advance
 
you need to use a technique called paging, search for that in google, there are lots of examples :)
 
Thanks, I`ll have a look around the web for paging examples
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top