Just a note:
When you run this select query on a table with thousands upon thousands of rows, it will hang the program (and the MySQL daemon) until it retrieves all the columns of data from all of the rows. Best way to solve this is by limiting the amount of rows returned per query, such as appending the limit clause to your query:
- index is the index from which you start the resultset
- count is the amount of rows returned in the resultset
For example, to return the first ten rows you would append:
But, if you want the next ten rows:
You can think of it as pages, (page_number - 1) * rows_returned_per_page.
Code:
page_number = 10
rows_returned_per_page = 7
(10 - 1) * 7 = index
9 * 7 = 63 = index
SELECT * FROM `tbl` LIMIT 63,7;
MySQL reference site:

(this is the version that comes with the binaries)