Just a simple piece of code on how to limit number of rows get from database...


PHP Code:
Use LIMIT in your sql query like this:

SELECT name FROM table LIMIT 5

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

SELECT name FROM table LIMIT 3