Simple / Basic Pagination / Navigation: PHP & MySQL

preview_player
Показать описание

The Best and The most Simple Pagination / Navigation using PHP and MySQL
Рекомендации по теме
Комментарии
Автор

Writing code in Notepad. Hardcore bro.

Good work on the tutorials by the way. I'm finding them very useful.

xJinWook
Автор

Truly, simple & useful. Thank you

tapaljor
Автор

oh thanks man...it works really fine...

dekhniavideo
Автор

thanks alot please upload more tutorials

slimj
Автор

It works fine when number of rows are even but if number of rows are odd then it skip 1 row...can you tell me the solution ASAP

dekhniavideo
Автор

You could find out what the number of pages should be and generate the numbers( links) with a for loop:
$numberOfPages = ceil($start / 5);

after that you should do the following

this should fix the problem for the part where you add the ( or die () ) statement. 

$end = 5;


if($start <= 0){
$start = 0;
     $end = $end - ( ($_GET['page'] * 5) - $rw[0]);
    



= mysql_query("SELECT * FROM apple LIMIT $start, $end");

hope this helps

men.webdesign