<?php $limit = mysql_escape_string($_GET['p']); if (empty($limit)){ $limit = "1"; } $page = $limit * 10; $flim1 = $page / 10; $flim = $page - 10; /* So basically, the 'p' is the page number, and $flim is "from" and $limit is "to" so this is at the end of the query I use to get my posts, feed or whatever */ ... LIMIT $flim, $page"); ?>
In my login, this would mean that if the page number is one, it would chose everything from 1 to 10, which is correct. But when I come to page number two, i get 20!
@BenWalker - I should mark this as solved. I misunderstood the "LIMIT" in mysql, I thought it was FROM, TO, but it is FROM, AMOUNT - so I figured it out :)
In my login, this would mean that if the page number is one, it would chose everything from 1 to 10, which is correct. But when I come to page number two, i get 20!
Can you see something I'm doing wrong here?
I get the following output:
p=1
p=2
p=5
What do you think I should be getting?