How display search results ? URGENT
Hai! friends,
I have added a search facility in my project. The problem is,assume that 25 matches were found matching search criteria. I want to display these 25 results in 3 pages. i.e., 10 results a page. How to do it ?
I have added a piece of code that I use to search the database.
########### Search Part starts here ##############
<%
Dim rs_search,rs_user
set rs_user=Server.CreateObject("ADODB.Recordset")
set rs_search=Server.CreateObject("ADODB.Recordset")
rs_search.open "SELECT DISTINCT dbo.userDetails.userID, dbo.userDetails.displayName FROM dbo.profileCategories INNER JOIN dbo.userDetails ON dbo.profileCategories.userID = dbo.userDetails.userID INNER JOIN dbo.Categories ON dbo.profileCategories.catID = dbo.Categories.catID WHERE (dbo.profileCategories.catID BETWEEN 2 AND 9)",Conn,1,2
do while NOT rs_search.EOF
%>
<P align="left">
<b>PTID :</b><%= rs_search("userID") %><br>
<b>Name :</b><%= rs_search("displayName") %><br>
<Center><a href="../viewprofile.asp?PTID=<%= rs_search("userID")%>">
<img src="../images/profile.gif" border="0" alt="View profile
<%= rs_search("displayName") %>"></a><br></center>
</p>
<%
rs_search.movenext
Loop
rs_search.close
set rs_search=NOTHING
%>
########### Search Part ends here ##############
All I want to know is how to break the output and put it in multiple pages (displaying only 10 results per page)
Any reply appriciated
Regards,
Arul
Arul Kumar.PA
__________________
Arul Kumar.PA
|