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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T21:00:30+00:00 2026-06-03T21:00:30+00:00

I am trying to use PHP to get MySQL to skip the first 5

  • 0

I am trying to use PHP to get MySQL to skip the first 5 entries into a table called “blog” and then list the 6th to 10th entry.

What I mean is if there is 10 entries in the table “blog” with “id” -> 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, I want PHP to skip all entries of “id” 6 to 10 and then echo “id” 1 to 5.

This is currently the code I have. How should I edit this to implement that?

$sql="SELECT * FROM blog ORDER BY id DESC;";
$result=mysqli_query($mysqli,$sql);

Thanks!

  • 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-06-03T21:00:32+00:00Added an answer on June 3, 2026 at 9:00 pm

    LIMIT is used for exactly this. Its usage is described in the article on SELECT in the MySQL documentation.

    SELECT * FROM blog ORDER BY id DESC LIMIT 5
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to use PHP and MySQL's Create Table Select between two different
I'm trying to use ASIFormDataRequest for iphone to get some values from my mysql
I'm trying to use a MERGE INTO statement in my php file to update
I'm trying to use $_SESSION['valid_user'] in a .php script that accesses the table mail
I'm trying to use php with mysql. basically i've an index page where user
I'm trying to use Ajax, PHP, and MySQL together to make a form element,
I'm trying to use jQuery to post a variable to a MySQL/PHP query. I
I'm trying to use PHP's split() (preg_split() is also an option if your answer
I am trying to use PHP and cURL to log in to a website
i am trying to use php-openid library for implementing openID in my site. the

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.