PHP Pagging

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
saren
Forum Newbie
Posts: 1
Joined: Sun Nov 27, 2011 8:48 pm

PHP Pagging

Post by saren »

Dear all, I have list of record that is too long (100 records) and I want to separate it in 10 records per page. can some give me code of pagging in PHP with MySQL with detail of common line.
Thanks
User avatar
Celauran
Moderator
Posts: 6427
Joined: Tue Nov 09, 2010 2:39 pm
Location: Montreal, Canada

Re: PHP Pagging

Post by Celauran »

Add a LIMIT clause to your query, say, LIMIT $offset, 10. Use $_GET['page'] to determine the value of $offset.
maxx99
Forum Contributor
Posts: 142
Joined: Mon Nov 21, 2011 3:40 am

Re: PHP Pagging

Post by maxx99 »

Post Reply