Honesty Rocks! truth rules.

Pagination ?

HOME      >>       Programming

alex1985

People they create the databases in which like the news stories are placed. Then that news stories, they are placed on certain page to be displayed and readable by other users on the web-site. How people do that thing paging, like you can see bottom, whenever, you go to Any CMS engines. Need the concept how you can create, 1, 2 or 3 pages, then next and back buttons, last and beginning page.


darran

Basically, it is using the concept of displaying a certain number of records from your database.

This article should help you:
http://www.php-mysql-tutorial.com/error.htm?aspxerrorpath=/php-mysql-paging.php


galexcd

Well this question has been brought up plenty of times in the forums. A simple search could have helped you, but here is a quick query to do this for you:

$resultsperpage=10;$result=mysql_query("SELECT * FROM content LIMIT ".$_GET['page'].",".$resultsperpage);


alex1985

Thanks. That should work, the code looks good. You, two guys, are the one who is good in it, because you always post replies when they are needed.