| Advertisement |
| Popular WPN Business Resources |
-

The Rise of Horizontal Content Sites
Over the last year, the search industry has seen a large rise in... -

Reaching Your Audience Through Online Video
Internet video is continuing to grow by leaps and bounds. -

Yahoo Reveals SEM of Re-Brand
Near the end of September, Yahoo began a new branding campaign in an...
iEntry 10th Anniversary
RSS
Newsletter
Advertising











9 Comments
Thanks!
Thanks so much for this easy to understand code. It slipped perfectly into a new site I'm building with very few tweaks at all.
paging
Mike,
Thank you for the time and effort that you put into this tutorial. You targeted those such as I, less experienced in mysql then I would like to be.
With a few fixes, it ran beautifully. I'll take your encouragement and modify it into the script that I am working.
I've read through many a tutorial on this matter (rather simple once learned) and came out of it worse.
Then I came upon your writing. Super~!
Thanks again.
Kind regards,
Al Toman
thanks alot very easy and
thanks alot very easy and self explained, appreciate your help, keep up the good work
thanx miky
thanx miky
Congratulations
Fantastic Page!! easy and powerful.
404 error when clicking pagination link
Hello and thank you for an awesome pagination tutorial!
I do have a problem with getting it to work properly when it comes to actually clicking the link that is formed during pagination. Every time I click on one of the pagination numbers (EG. the number 2) I get a 404 page not found error. I've tried a few things but cant seem to fix this. Anything special needing to be done?
Thanks!
Thanks for sharing your fix.
Thanks for responding with your fix, Sean!
Of Course.
It figures that right after posting that comment, I figure it out.
Using ' LIMIT x OFFSET y ' in your sql query takes care of all of that for you. In your example above, x would be
$offset, and y would be ($entries_per_page * $page_number ). I tried using the ' LIMIT x,y ' form on my version of MySQL, but it doesn't like me very much ( or more likely I'm just doing it wrong ).
Deleted entries?
What about when there are rows missing? For example, a user may delete posts from a blog, leaving rows missing. Then you may have id's jumping one or more at a time ( ie, 1,2,4,5,6,8,10 ). How would you deal with this? I've been working on this for a few days now, and it's starting to bug me.
So far the only idea I've is to try and figure out if there are any missing ID's on the last statement ( ie, your last page showed items 6,8, and 10 ), and then move forward the proper ammount. I'm still working on it, and hopefully I'll have something soon.
Post new comment