Jump to content

Archived

This topic is now archived and is closed to further replies.

burntheblobs

[SOLVED] Starting a mysql query at a certain row number

Recommended Posts

I have a database search on one of my pages and I am trying to break up every ten results with a new page. The problem is trying to figure out a way to get results from a certain row number on (i.e. page two would start at row number 11, not the first row). Keep in mind this isn't as simple as selection row number 11 from the database because it has two be row 11 from the array of search results. Any thoughts?

Share this post


Link to post
Share on other sites

The LIMIT can be set. Google "PHP & MySQL Pagination" or something along those lines, as long as it has Pagination in it.

Share this post


Link to post
Share on other sites

SELECT field FROM table LIMIT starting_row, number_of_rows

 

Where starting_row is the number of the first row that you want to grab, and number_of_rows is...

 

Well, that's what it is.

Share this post


Link to post
Share on other sites

×
×
  • 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.