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

The Archive Base Latest Questions

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

if i had 10 rows which fits this description on mysql SELECT id, nav,

  • 0

if i had 10 rows which fits this description on mysql

SELECT id, nav, img 
FROM mytable 
WHERE id='$id' 
ORDER BY pageDisplayNum ASC;

pageDisplayNum may not be in numeric order, meaning 1, 2, 5, 10, 16, 22 etc...
q: how can i choose the 3rd or 6th item from this list

the index number would be coming in from php as a variable
i read about TOP but this didnt work either

SELECT TOP $num 
id, nav, img 
FROM mytable 
WHERE id='$id'
ORDER BY pageDisplayNum ASC;
  • 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-03T19:37:40+00:00Added an answer on June 3, 2026 at 7:37 pm

    This for 7th item

    SELECT id, nav, img 
    FROM mytable 
    WHERE id='$id' 
    ORDER BY pageDisplayNum ASC;
    LIMIT 6,1
    

    You can add LIMIT offset,row_count query

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

Sidebar

Related Questions

I've always had a weird feeling in my gut about actually deleting rows from
INFORMIX-SE: My users periodically run an SQL script [REORG.SQL] which unloads all rows from
I have a table for which I am attempting to select all rows which
I asked this question before, but had a hard time showing which edits I
I had to delete all the rows from a log table that contained about
The query below selects the rows from table_1 which do not exist in table_2
I have a stored proc and I am trying to select all rows from
If I had 1000 rows, would a single-line separator make the table view bigger
Imagine I had an id column and each of its rows contained a number.
Had this working; at one stage. The problem is the following text is now

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.