Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6596905
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T18:08:17+00:00 2026-05-25T18:08:17+00:00

I answered my own question, sorry! I started with this: If Request(currentPage) <> AND

  • 0

I answered my own question, sorry!

I started with this:

If Request("currentPage") <> "" AND isNumeric(Request("currentPage")) Then
    currentPage = Request("currentPage")
Else
    currentPage = 1
End If

And then on my paging links, I added:

.asp?currentPage="&currentPage+1&"

///////////////////////////////////////////////////////////////////

I have upgraded my search script to use LIMIT paging.

I am simply trying to work out what the current page is, based on the ‘offset’ value but I’m having some amateur troubles.

This is what I have:

currentPage = pageRange / rpp

' page range is the offset value for the LIMIT clause, for example 0, 20, 40...
' rpp is results per page value, for example 20...

If cInt(currentPage) <= 0 Then
    currentPage = 1
End If

But page 1 and 2 both show “page 1”, page 3 shows “page 2”, page 4 shows “page 3” and so on. Obviously there is something wrong with this calculation but I cannot see it.

Any ideas?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T18:08:18+00:00Added an answer on May 25, 2026 at 6:08 pm

    May be better to keep track on page num and evaluate offset from it, than tracking offset? Or at least evaluate currentPage as cInt(pageRange / rpp)+1

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This is a follow-up to #1644748 where I successfully answered my own question, but
Sorry if this question has already been answered elsewhere. I looked through stack overflow
Answer: I answered my own question and left it on here for anyone else
PLEASE NOTE: I've answered my own question with a link to an answer to
I came across this answered question , but I can't seem to compile the
After having this question answered through a link to an external site , I
If this is answered somewhere else, kindly smack me and point me in the
Edit: Answered my own question. See below. -_- I have a variable defined in
I sort of answered my own question I think but I want to make
edit2: Well I found out what was wrong. answered my own question. * Face-palm*

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.