Cazpa.com PHP Developer & Website Designer

9Feb/1017

PHP Tutorials: Pagination (Part 2)

Visit the forum for help! phpacademy.info Follow on Twitter! twitter.com Paginating results from a mysql database. This is a (almost) simple method of showing paginated results effectively.

No related posts.

About Daniel Smith

I am the boss around here, if you need anything then send me a message :))

Popular Content & Keywords

add update delete in php,depositfiles hack,warning: mail() [function mail]: smtp server response: 554 the message was rejected because it contains prohibited virus or spam content in,rails vs php performance,add update delete records from sql server using php,php define variable,php add update delete,php tutorial deutsch,warning: mail() [function mail]: smtp server response: 554 the message was rejected because it contains prohibited virus or spam content,tutorial create contact form in dreamweaver php,ruby on rails vs php 2010,php tutorial // user registration w/ sql,,send emails with a web form: php scripting,php tutorial - register form insert into database
Comments (17) Trackbacks (0)
  1. omg omg omg!!!11

  2. Is it possible to limit the number of link ? to 10 for an example?

    Prev 1 2 3 4 5 6 7 8 9 10 next
    If you’re on page 11
    Prev 11 12 13 14… 21 next

  3. Hi, Alex. Wow, you made that very easy. Mind was very messy and complicated. Do you like the idea of OOP PHP? Just wondering. xD

  4. awesome tutorial alex!!!

  5. 5 star again!!! :)

  6. Thanks for the tutorial. It’s useful for my webpage now, especially on the news section.

  7. best php teacher on the internet!

  8. I totally agree. I love they way he explains each part of the code so well. I learned most of the php from him and next semester I’m doing php so ill be like pro at it thanks to you tho.. = )

  9. I Love Your Forum

  10. Alex your a true god! Any chance of merging search engine with pagination? ive tried fiddling with it but nothing is working, thank you

  11. thanks for sharing Alex.

  12. Works good unless users changes the url start-variable by themself.

    The best way of doing it is actually by having a page-variable instead of start, then if users changes it to 2 it would still show page 2, mysql rows 5-9. If a user changes the start-variable to 2, as the navigation works now, it would show mysql row 2-6.

    But why would users do that :)

    Thanks for another great tutorial!! Looking forward to part 3!!

  13. Great tutorial, and I think what you were looking for at ~3:40 was 0,4 5,9 etc.

  14. Thank you this video was perfect. Keep up with the videos.

  15. I found these EXTREMELY useful, thank you so much! One question though:

    If there are fewer records returned than the maximum amount we want to display per page, is there an easy way of hiding the ‘1′? The ‘next’ link doesn’t show up, which is good, but there’s still that ‘1′ sitting there.

    Thanks
    Liam

  16. I learned more from you than watching that Lynda tutorial because you explain each step clearly and show us what happens if we mess up or if there is something lacking in our code. You are indeed a great teacher. Keep it up!

  17. @iamtheboat Put
    if($record_count > $per_page);
    {
    directly after the //show page numbers comment.
    Then put a } directly before the //show next button comment.


Leave a comment

You must be logged in to post a comment.

No trackbacks yet.

Powered by WordPress Lab