Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Apr 2006
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    search page problem

    Hiya. I've got a problem using ASP. Basically, I'm making a online auction site as a project but I'm having some trouble. I've got a search page, which will display all the items. Problem is only 15 will fit on the page, so I want to add some controls to go to the next lot of 15 results and so on.. so it looks sort of like << 1 2 >>

    I managed to get this working fine, but now I've added a combo box to specify a category. Initially, there program assumed there were all in the same category so there was no problem but now, since this has been added, I can't do this. Does any one have any ideas how I can fix this? Help would be most appreciated.

    I'm not sure what code exactly to post, but here's where I think a problem could lie.. If you need to see more code, please say so. viewitem.asp is the name of the page.

    Thanks a lot

    <%

    if totalrecord>msgperpage then
    ctr=1
    response.Write("Page < ")
    do while(ctr<totalpage+1)
    response.Write("<a href=viewitem.asp?countrs="& ctr &">" & ctr & "</a> ")
    ctr=ctr+1
    loop
    response.Write(">")
    end if
    %>

    <%
    temp=0
    temp=(page-1)*msgperpage

    if page>1 then
    do until temp=0
    rsUser.movenext
    temp=temp-1
    loop
    end if



    %>
    <% Do while(counter<msgperpage) %>
    <%
    counter=counter+1
    rsUser.movenext
    if rsUser.eof then
    counter=msgperpage+1
    end if
    loop
    %>

  • #2
    Senior Coder
    Join Date
    Dec 2002
    Location
    Arlington, Texas USA
    Posts
    1,062
    Thanks
    4
    Thanked 8 Times in 8 Posts
    unless you have the category hard coded into the sql statement you will also need to include that into the query string.

    ps is there html in between the delimiters? If not, then get rid of all the excess delimiters. It will speed up your code's execution.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •