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 948923
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T23:19:19+00:00 2026-05-15T23:19:19+00:00

I wanna print a incresing number with each post. Like every forum has this.

  • 0

I wanna print a incresing number with each post. Like every forum has this.

I currently use this:

$i = 0; while ($post = mysql_fetch_assoc($rs)): $i++;

Lets say i print 5 post per page

This is what happens:

#1 First post
#2 2nd post
#3 3rd post
#4 4th post
#5 5th post

Then you go to page to 2

#1 6th post
#2 7th post
#3 8th post
#4 9th post
#5 10th post

I dont want that, I want it to keep increse highest number from first page

The sql:

SELECT u.group_id, u.username, u.title, p.poster, p.message, p.thread_id, g.g_title, g.g_user_title FROM posts AS p 
        INNER JOIN users AS u ON u.id = p.poster 
        INNER JOIN groups AS g ON g.g_id = u.group_id
        WHERE p.thread_id = $id
        LIMIT $startIndex, $perPage
  • 1 1 Answer
  • 2 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-15T23:19:20+00:00Added an answer on May 15, 2026 at 11:19 pm

    You must have a variable identifying which page you’re on. Multiply the page number by the number of elements per page. Voila, the unique ID of the first element of page N.

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

Sidebar

Related Questions

So I wanna print some text after i print my variables like this: print('Blablabla'
I wanna print the value of b[FFFC] like below, short var = 0xFFFC; printf(%d\n,
I wanna save this command to another text: awk '{print $2}' it extract's from
This is my first time I have to use print preview and I got
i wanna print to a receipt printer. This would be plugged to a RS323
I wanna print a few values in the console, how do I do this?
I want to get print out invoice but also wanna set margins and page
I wanna upload/update file by System.IO.FileStream in Google Documents List API(C#)? I use two
I wanna use powershell to get all the file in sharepoint library EM_DOC_LIBRARY and
I have a questions. I search for a solution for these. Wanna use el

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.