DISQUS

DISQUS Hello!  The comments on this profile are unclaimed and thus are unverified.

Do they belong to you? Claim these comments.

vassy's picture

Unregistered

Feeds

aliases

  • vassy

vassy

1 year ago

in PatchLog | MySQL: counting results on Patchlog
Oh, yeah, kinda useless comment, I misunderstood what you had to say, please delete my stupidity.

And I know it's not correct because I said it's an idea, I didn't wrote something just from dreams, that's how I've queried for pagination, of course counting separately the total number of results.

1 year ago

in PatchLog | MySQL: counting results on Patchlog
var $on_page = 10;

function listStuff($page)
{
$start = ($page - 1) * $on_page;
mysql_query("SELECT * FROM stuff LIMIT $start,$on_page");
}

this is the idea in the list function, you can call it with different page numbers to get where you want, even to the first or last page.
Returning? Login