Jump to content

mysql_query to start at specific row


alecks

Recommended Posts

I want to query a table (mysql) and fetch all information from rows starting at a specific row. How would I do this?

 

ex:

(rows I want to get info from are bolded)

 

Mysql Table

 

1  info

2  info

3  info

4  info

5  info

6  info

7  info

8  info

9  info

... etc

 

 

More specifically, what would the query have to be like?

 

mysql_query(SELECT * FROM `table` WHERE...)

Link to comment
Share on other sites

I just looked at the MySQL docs for 4.1, and it had it that way. But I clearly remember in the 5.0 docs that it had it my way. I'm currently working on loading the 5.0 docs, so I'll edit this when they finally decide to load.

 

[EDIT]Well it seems like 5.0 is the same way. Too many different syntaxes to remember. Sorry about that.

 

Though I think jesirose is right. Should just use LIMIT and OFFSET to avoid confusion.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.