Alert icon
We're changing our privacy policy. This stuff matters.  Learn more  Dismiss

Pagination Tutorial for PHP MySQL Programmers - Web Intersect Paging Database Results

Loading...

Sign in or sign up now!
Alert icon
Upgrade to the latest Flash Player for improved playback performance. Upgrade now or more info.
30,891
Loading...
Alert icon
Sign in or sign up now!
Alert icon

Uploaded by on Aug 17, 2010

Get the independent generic version of this tutorial in text tutorial form here: http://www.developphp.com/view_lesson.php?v=289

Web Intersect Source Code: http://www.webintersect.com

Adam teaches how to throw down on custom PHP MySQL Pagination programming.

  • likes, 3 dislikes

Link to this comment:

Share to:

Uploader Comments (flashbuilding)

  • Wouldn't it be more efficient to use "COUNT(*)" in SQL query to get numer of rows instead of running the whole big query and using mysql_num_rows($sql) function?

  • @yco79 - Yes it is. And even more efficient than that is to use a session variable to only have to query that total amount number... one time and not on every page request. I do a lot of things really basic and beginner friendly in tutorials. They can go further and learn to be more efficient once they grasp the logic. Go for a session variable based pagination for top efficiency. How about I update this tutorial... I will show the session based example to show the most efficient.

Top Comments

  • you should defenetly go into teaching. I honestly learn more out of your tutorials than i do in my college class, I NEVER understood how to paginate, and with ur video, i totaly get it now, my pagination is a bit different than urs, but same idea, thx ur videos are always a big help ^.^

    WRITE A BOOK!!!

see all

All Comments (56)

Sign In or Sign Up now to post a comment!
  • how to add pagination in blogger?

  • i keep getting this error message, also i am using MAMP, thanks.

    Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in /Applications/MAMP/htdocs/test­/scripts/homePage_randomMember­s.php on line 33

  • amazing teacher

  • great vid adam. Thanks

  • you rock man!

  • Thanks to you sir...you made me understand pagination thru your video tuts.

    More power.

    I subscribed.

    :D

  • ba-da ping ,, . :)

  • $sql1=mysql_query("Select pid, title, author, price, picture1 from tblproducts where scid='$scid' and penabled='1' ORDER BY pid ASC");

    when i put the $scid it can only be function in first paging when i reach second page the page is blank but when i use the scid in '1' can be function and take all from database which the scid is 1 but can use in variable passing

Loading...

Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more