PDA

View Full Version : How to limit number of rows get from database..:idea:



joshuayork
04-29-2008, 08:36 AM
Just a simple piece of code on how to limit number of rows get from database...




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, 5


:idea: