Limit the number of rows returned

MySQL supports the LIMIT keyword, which allows you to control how many rows are returned; ideal when displaying data over many pages. You can use LIMIT in your sql query like this:

SELECT name FROM table LIMIT 10

if you want to get the rows between 10 and 20 do the following:

SELECT name FROM table LIMIT 9, 10

For a ADO solution (with an Access / MS SQL Server database), click here.

You might also like...

Comments

 Alt-PHP-Faq

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live.” - Rick Osborne