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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T01:06:12+00:00 2026-05-14T01:06:12+00:00

as the comments always have it, you can select to show the top 5

  • 0

as the comments always have it, you can select to show the top 5 comments (which i know how) and if there is more than 5, you can click a link and it will show the following 5 comments. The problem is that i don’t know how the code should be for it to show the next 5.

Better idea of what i’m saying
Let’s say i have 10 comments, i use

SELECT * FROM news ORDER BY ID DESC
LIMIT 5

that will show the TOP 5 comments say, the comments with ID 10,9,8,7,6

but what if i want the comments with ID 5,4,3,2,1 ?

  • 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-14T01:06:12+00:00Added an answer on May 14, 2026 at 1:06 am
    SELECT * FROM news ORDER BY ID DESC LIMIT 5, 5
    

    Assuming that you use MySQL, LIMIT supports two parameters, offset (optional) and row_count:

    [LIMIT {[offset,] row_count | row_count OFFSET offset}]

    The alternative way using OFFSET is for compatibility with PostgreSQL.

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

Sidebar

Related Questions

Update1: this is all looks great but there is big problem which i have
In my ruby-on-rails app, I have nested comments that can be nested an arbitrary
I have these tables: comments uid id pid pages pid user users id rank
I have Comments for something and it's possible to like them. The likes are
I have included Django comments framework in my project, and added custom templates to
I use the django comments from contrib and I have an object (entry) that
I have a question on accessing already existing paired bluetooth connections... How can a
I know generally it is always better performance to build mysql queries to name
I develop a lot of frameworks for Flash games and applications. I have always
I have a file which contains mostly of names mapping to a certain list

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.