faqts : Computers : Programming : Languages : PHP : Database Backed Sites : MySQL

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

29 of 74 people (39%) answered Yes
Recently 3 of 10 people (30%) answered Yes

Entry

How do I use PHP to display rows from a MySQL database in multiples of 50 (1-50, 51-100, etc)? Thanks.

Jul 26th, 2000 16:54
Evan Heller, Ferdinando Simonetti, Samuel Obukwelu, Derrek Grebinski, unknown unknown,


"Add to the end of your SQL statement "Limit 50"."
It's not true, 'cause only "first" 50 record appears, every time you 
execute the query.
I'm just working on such a problem, and I hope that soon I can post an 
answer
The Answer your are looking for is limit X,Y where X is the "start 
point" and Y is how many to retrieve. So for example:  limit 0,50 limit 
50,50 limit 100,50 get the first 50, next 50 and the next 50