02-07-2008, 03:07 PM
|
#7 (permalink)
|
|
The Prestige
Join Date: Dec 2007
Posts: 1,044
Thanks: 193
|
Quote:
Originally Posted by Village Idiot
Your math wont work on page or 1
PHP Code:
$max = 3; $p = $_GET['p']; $limit = ($p - 1) * $max; $rows = @mysql_num_rows($query); $numOfPages = ceil($rows/$max);
If $page = 1, it will be subtracted to zero and $limit will be zero. Or if $page = 0, max will be -3
Salathe explained the limit comman well. But to answer your specific question, you cant limit to a negative number like that. Although your paganation script wont work with the query you have at the first post
</span></span>
|
I need a pagination. -_-
Could you guys make a tutorial on this?
I'm not good with math when using MySQL. :S
__________________
VillageIdiot can have my babbies ;d
|
|
|
|